ENTITY:Think

From Garry's Mod
Jump to: navigation, search
 ENTITY:Think( )

Contents

Description

Called every frame on the client. Called every tick on the server.

NOTE By default, it runs about 5-6 times per second on the server, but you can force it to run at servers tickrate using the example below.

Returns

boolean

Return true if you used Entity:NextThink to override the next execution time.

Examples

Example

Force the think hook to run at the maximum frequency. This is generally only useable for anim entities, if the entity has any animations.

function ENT:Think()
	-- Do stuff

	self:NextThink( CurTime() )
	return true
end


Personal tools
Navigation