$declareanimation: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
($declareanimation)
 
(Unfinished command. Tested in multiple versions of studiomdl from Source 2013 to Portal 2)
Line 2: Line 2:


{{note|Since the data doesn't actually exist in the current .mdl, some care needs to be taken when using this.  You can't do any operations on the animation - such as subtract, etc., or it's possible the model compiler will crash.}}
{{note|Since the data doesn't actually exist in the current .mdl, some care needs to be taken when using this.  You can't do any operations on the animation - such as subtract, etc., or it's possible the model compiler will crash.}}
{{bug|Does not function/compile in any known version of studiomdl.}}


== Syntax ==
== Syntax ==

Revision as of 16:01, 7 August 2019

Forward declares an animation. This useful when you want to use an animation in a sequence, but the data for it won't be loaded until a later external .mdl file (see $includemodel). $declareanimation makes a empty animation entry so that the local sequence can reference something, and at run time these references are overwritten with the actual animation index.

Note.pngNote:Since the data doesn't actually exist in the current .mdl, some care needs to be taken when using this. You can't do any operations on the animation - such as subtract, etc., or it's possible the model compiler will crash.
Icon-Bug.pngBug:Does not function/compile in any known version of studiomdl.  [todo tested in ?]

Syntax

$declareanimation <name>