Creating an interaction: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
	
 Note:An interaction should only be declared in one NPC's
Note:An interaction should only be declared in one NPC's 
		
	
| BocroLtatr (talk | contribs)  (trrororiclet) | m (Reverted edit of BocroLtatr, changed back to last version by JeffLane) | ||
| Line 1: | Line 1: | ||
| {{npc tut}} | {{npc tut}} | ||
Revision as of 00:47, 18 January 2009
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:An interaction should only be declared in one NPC's
Note: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