$declaresequence

From Valve Developer Community
Revision as of 14:27, 18 October 2018 by Ficool2 (talk | contribs) (Added a simple description/example, thanks to MrFunreal for the better explanation)
Jump to navigation Jump to search

Forward declares a sequence.

This is useful when you want to add other sequences as layers that aren't locally declared, such as when they're actually part of an external .mdl file (see $includemodel). $declaresequence makes a empty sequence entry so that the local sequence pointers can get set, and at run time these references are overwritten with the actual sequence index.

In simple man's terms: $declaresequence can be used to tell the compiler that the declared sequences are to be taken from the $includemodel, but the ones not declared will be taken from the current compile. Useful to prevent sequence index mismatches if modding for multiplayer.

Syntax

$declaresequence (name)