Garry's Mod Wiki

Entity:Fire

Entity:Fire( string input, string param, number delay = 0 )

Description

Fires an entity's input. You can find inputs for most entities on the Valve Developer Wiki

See also Entity:Input and GM:AcceptInput.

Arguments

1 string input
The name of the input to fire
2 string param
The value to give to the input, can also be a number or a boolean.
3 number delay = 0
Delay in seconds before firing

Example

If you are looking at a door, this will lock it

// Entity(1) is considered a player in this example local tr = Entity( 1 ):GetEyeTrace() local ent = tr.Entity if IsValid( ent ) then ent:Fire("Lock") end

Page Links


Special Pages


Wikis

?

Render Time: 61ms

DB GetPage 12
Generate Html 10
SaveChanges (1) 18
Render Body 0
Render Sidebar 18