Signature
GetAnimLength(<animation>)
Parameters
| Name | Required? | Details |
|---|---|---|
| animation | Required | a primitive animation: calling this function on a non-primitive animation will fail |
Example (from Treyarch's docs)
cycleTime = GetAnimLength( climbAnim )
Real uses in BO3's scripts
Called 99 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_ai_astro.gsc, line 461
time = getanimlength(headbutt_anim); - scripts/zm/_zm_ai_faller.gsc, line 288
level.faller_emerge_time = getanimlength(faller_anim); - scripts/zm/_zm_ai_margwa.gsc, line 579
swipeactiontime = getanimlength(swipeactionanimation) * 1000; - scripts/zm/_zm_ai_margwa_no_idgun.gsc, line 621
swipeactiontime = getanimlength(swipeactionanimation) * 1000; - scripts/zm/_zm_ai_monkey.gsc, line 2222
time = getanimlength(perk_attack_anim);
Related built-ins
- GetZBarrierPieceAnimLengthForState()Returns the length in seconds for the animation associated with the supplied state for a piece, in seconds.
- UseAnimTree()Sets the anim tree for the entity
- ClearAnim()Sets an animation's goal weight (and the goal weights of all of its descendents) to zero over the specified time.
- AnimScripted()Runs an animscript on an entity.
- SetAnim()Restart": These functions cause the animation to restart.
- Length()Returns the length of the given vector
- StopAnimScripted()Halts animscript on this entity.
- AnimMode()Set the way that animation deltas are interpreted by the game engine
- ASMSetAnimationRate()Change the delta animation rate for the entity using ASM.
- LengthSquared()Returns the squared vector length for the given vector - this is cheaper than the actual vector length as it doesn't involve a square root
- HasAnimTree()Returns true if the entity has an anim tree
- SetAnimRestart()See "SetAnim.
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).