Garry's Mod Wiki

Entity:SequenceDuration

number Entity:SequenceDuration( number seqid = nil )

Description

Returns length of currently played sequence.

This will return incorrect results for weapons and viewmodels clientside in thirdperson.

Arguments

1 number seqid = nil
A sequence ID to return the length specific sequence of instead of the entity's main/currently playing sequence.

Returns

1 number
The length of the sequence

Example

Example usage for the argument. Retrieve length of animation on specific gesture slot.

local ply = Entity( 1 ) local seq = ply:SelectWeightedSequence( ACT_GMOD_TAUNT_CHEER ) local len = ply:SequenceDuration( seq ) print( ply, seq, len )
Output: Player [1][Rubat] 303 2.7499999180436

Page Links


Special Pages


Wikis

?

Render Time: 36ms

DB GetPage 3
Generate Html 9
SaveChanges 9
Render Body 0
Render Sidebar 13