Creating an interaction

From Valve Developer Community
Revision as of 11:50, 10 December 2007 by BasvaRdomr (talk | contribs)
Jump to navigation Jump to search

comic strip als scan riku chakras music education lamp beauty product smoked salmon discount airline ticket window screen commercial inground pool slide chicken recipe knee brace north carolina beaches rate my thong snacks richardson network security attacks sarco polyphonic ring tones binders baseball stats strike anywhere samantha brown beaded earrings gryphon langerie distance education product branding geocaching.com dragon pink kikyou gigolo elie wiesel cops aboriginal www.youravon.com doe psycology best mlm compaq computers big brest search engine ranking commodity trading hannibal welcome to my life cookbooks cool msn names women mud wrestling byob pontiac firebird wright brothers mapquest.com cheap paintball spirit in the sky florida department of corrections leave server hosting csfi fuel injectors cheap natural soap bean bags ad table linens herbal supplements sportster hotel rwanda muddy girls directtv.com ice cream machine gmc parts reverse search custom draperies sunshine cruz vonzell lethal b drug treatment centers moccasin kitchen lighting kiera ultravox dragnet ash wednesday free people locator jaime pressly rubber roofing screw woodworkers supply watch winder kauai rentals minigun stiff upper lip pin ups closets german shorthair pointer gorgeous women burke bart lisa oracle photoshop brushes angie harmon

Declaration

The first step to creating an interaction for your NPC is to create a name for it and add it to the "Interactions" section as well as adding it to src\dlls\hl2_dll\AI_Interactions.h. Here's an example name for an activity: g_interactionVortigauntKick.

Once the activity is added, you must use the DECLARE_INTERACTION macro in the AI_BEGIN_CUSTOM_NPC section.

Here's an example of the DECLARE_INTERACTION code:

DECLARE_INTERACTION( g_interactionExample )
Note.pngNote:An interaction should only be declared in one NPC's AI_BEGIN_CUSTOM_NPC section, regardless of how many NPCs utilize it.

Implementation

Todo: Implementation