Activity: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{stub}}
'''Activities''' are [[Wikipedia:Indirection|indirected]] names for animations (or collections of animations). The single activity <code>ACT_MP_WALK</code> might trigger the animation ''walk_cycle'' in one model, but either the animation ''hover_glide'' or ''hover_glide_02'' in another.


''The following information is just what i believe activities to be. Should this information be wrong, feel free to correct or delete it entirely.''
If there are multiple animations mapped to the same activity, they will be chosen between at random depending on their assigned weight.
-rvIceBreaker


== See also ==


Activities are model animations used by NPC and Player models. When referring to a world model animation, it is known as an Activity within the game's code.
*[[$sequence]]
 
For example, when you want to make an NPC or Player run a certain animation, you would set its activity accordingly.
 
 
''I am unsure if Activities are used in prop models, but if so, I would imagine the same applies for those types of entities also.'' -rvIceBreaker
 
''(below is content originally on this page)''
 
 
The advantage to using activities is that the modeler can bind multiple sequences to one activity name, thus getting some variation in the animations the model plays without programmer intervention. For example, the modeler could create three idle animations and bind them all to ACT_IDLE. The programmer only has to write code saying to play ACT_IDLE, and one of the three idle sequences will be chosen.


[[Category:Glossary]]
[[Category:Glossary]]
[[Category:Animation]]
[[Category:Animation]]

Revision as of 06:41, 24 April 2010

Activities are indirected names for animations (or collections of animations). The single activity ACT_MP_WALK might trigger the animation walk_cycle in one model, but either the animation hover_glide or hover_glide_02 in another.

If there are multiple animations mapped to the same activity, they will be chosen between at random depending on their assigned weight.

See also