Garry's Mod Wiki

Entity:GetSequenceGroundSpeed

Entity:GetSequenceGroundSpeed

  number Entity:GetSequenceGroundSpeed( number sequenceId )

Description

Returns the ground speed of the entity's sequence.

Arguments

1 number sequenceId
The sequence ID.

Returns

1 number
The ground speed of this sequence.

Example

Move the NextBot based on the ground speed of its walking animation (within its coroutine).

In most cases it's better to use NextBot:BodyMoveXY instead.
local sequence = self:LookupSequence( "walk_all" ) if ( sequence ) then self:StartActivity( ACT_WALK ) self:SetSequence( sequence ) self.loco:SetDesiredSpeed( self:GetSequenceGroundSpeed( sequence ) ) end

Special Pages


Wikis

?

Render Time: 59ms

DB GetPage 41
Generate Html 4
SaveChanges (1) 6
Render Body 0
Render Sidebar 7