Entity:SetSequence
Description
Sets the entity's model sequence.
If the specified sequence is already active, the animation will not be restarted. See Entity:ResetSequence for a function that restarts the animation even if it is already playing.
In some cases you want to run Entity:ResetSequenceInfo to make this function run.
Will not work on players due to the animations being reset every frame by the base gamemode animation system. See GM:CalcMainActivity.
For custom scripted entities you will want to apply example from ENTITY:Think to make animations work.
Arguments
If set to a number, the input is treated as the sequence ID.
If set to a string, the function will automatically call Entity:LookupSequence to retrieve the sequence ID.
Example
Set the entity to play the "idle" sequence.
Example
Set the entity to play the first sequence defined on the model (usually idle).
Garry's Mod
Rust
Steamworks
Wiki Help