Creating an animevent: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (squadslot)
mNo edit summary
Line 2: Line 2:
Animevents are useful for adding mid-animation functionality.
Animevents are useful for adding mid-animation functionality.


The first step to creating an animevent for your NPC is to create a name for it and add it to the enum. Here's an example name for an animevent: '''COMBINE_AE_ALTFIRE'''.
The first step to creating an animevent for your NPC is to create a name for it and add it to "Private animevents" section. Here's an example name for an animevent: '''COMBINE_AE_ALTFIRE'''.


Once the activity is added to the enum, you must use the '''DECLARE_ANIMEVENT''' macro in the '''AI_BEGIN_CUSTOM_NPC''' section.
Once the activity is added to the enum, you must use the '''DECLARE_ANIMEVENT''' macro in the '''AI_BEGIN_CUSTOM_NPC''' section.

Revision as of 13:22, 8 June 2006

Animevents are useful for adding mid-animation functionality.

The first step to creating an animevent for your NPC is to create a name for it and add it to "Private animevents" section. Here's an example name for an animevent: COMBINE_AE_ALTFIRE.

Once the activity is added to the enum, you must use the DECLARE_ANIMEVENT macro in the AI_BEGIN_CUSTOM_NPC section.

Here's an example of the DECLARE_ANIMEVENT code:

	DECLARE_ANIMEVENT( NEWNPC_AE_ANIMEVENT )