Entity.NextThink

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:NextThink( Integer timestamp )
Description:
In the case of a scripted entity, this will cause the entity's next "OnThink" event to be run at the time given.
Returns: nil
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.NextThink]Entity.NextThink [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThink and set the next think time to a second from now.
Used onNewerServer.png
Code
function ENT:Think()
    Msg( "Entity thinks...\n" )
    self:NextThink( CurTime() + 1 )
    return true // Note: You need to return true to override the default next think time
end
OutputN/A


Additional notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox