Entity.WaterLevel

From GMod Wiki

Revision as of 00:53, 27 March 2010 by Unrealomega (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Entity:WaterLevel( )
Description:
Returns the amount of water level an entity has.
Returns: Number
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.WaterLevel]Entity.WaterLevel [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]




Examples

DescriptionExtinguish fires when in water.
Used onNewerServer.png
Code
if ( ent:WaterLevel() > 0 and ent:IsOnFire() ) then
 	ent:Extinguish();
end
OutputThis will make an entity stop burning if it falls in water. This is already included in Garry's Mod.


Return Values

Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox