Entity/Ignite

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Fixed page)
Line 11: Line 11:
 
{{Arg
 
{{Arg
 
|type=number
 
|type=number
|name=radius (optional)
+
|name=radius
 
|desc=The radius of the ignition, will ignite everything around the entity that is in this radius.
 
|desc=The radius of the ignition, will ignite everything around the entity that is in this radius.
 +
|default=0
 
}}
 
}}
 
{{Example
 
{{Example
 
|Description=Ignite all props on the map for 30 seconds.
 
|Description=Ignite all props on the map for 30 seconds.
|Code=function ignite()
+
|Code=for k, v in pairs(ents.FindByClass("prop_physics")) do
for k, v in pairs(ents.FindByClass("prop_physics")) do
+
  v:Ignite(30)
v:Ignite(30)
+
end
+
 
end
 
end
 
}}
 
}}

Revision as of 22:12, 18 August 2018

 Entity:Ignite( )

Contents

Description

Sets the entity on fire.

Arguments

number length

How long to keep the entity ignited. Not supplying this argument will not ignite the entity at all.

Arguments

number radius=0

The radius of the ignition, will ignite everything around the entity that is in this radius.

Examples

Example

Ignite all props on the map for 30 seconds.

for k, v in pairs(ents.FindByClass("prop_physics")) do
   v:Ignite(30)
end


Personal tools
Navigation