Creating an interaction

From Valve Developer Community
Revision as of 13:29, 8 June 2006 by Ts2do (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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_interactionExampleInteraction )
Note.pngNote:An interaction should only be declared in one NPC's AI_BEGIN_CUSTOM_NPC section, regardless of how many NPCs utilize it.