Activity: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{stub}}
'''Activities''' are [[Wikipedia:Indirection|indirected]] names for animations or collections of animations.


''The following information is just what i believe activities to be. Should this information be wrong, feel free to correct or delete it entirely.''
The single activity <code>ACT_MP_WALK</code> might trigger the animation ''walk_cycle'' in one model, and either the animation ''hover_glide'' or ''hover_glide_02'' in another (chosen between at random based on 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]]
*[[Activity_List|Activity List]]


For example, when you want to make an NPC or Player run a certain animation, you would set its activity accordingly.
[[Category:Source]]
 
''(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:Animation]]
[[Category:Animation]]

Latest revision as of 01:46, 9 April 2023

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, and either the animation hover_glide or hover_glide_02 in another (chosen between at random based on assigned weight).

See also