Garry's Mod Wiki

Garry's Mod Wiki

  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.

Issue Tracker: 2783

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

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...