Entity.ResetSequence
From GMod Wiki
Function | |
Syntax | Entity:ResetSequence( Integer sequence ) |
Description: | |
Sets the entity's model sequence. If the sequence is already playing, it will be reset and played from the beginning. | |
Returns: | nil |
In Object: | Entity |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Entity.ResetSequence]Entity.ResetSequence [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Set the entity to play the "idle" sequence. |
---|---|
Used on | |
Code | local sequence = self:LookupSequence("idle") self:ResetSequence(sequence) |
Output | N/A |
Additional Notes
- If you want to be able to set a sequence without it restarting from the beginning, use Entity:SetSequence.
- Make sure, if this is called in a SENT, that the ThinkFunction uses a "higher tickrate". Otherwise, the animation look sloppy. Watch ENT:NextThink for this