Entity.IsWorld

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:IsWorld( )
Description:
Returns true if the entity is worldspawn (if the entity is part of the world). Floors, walls, roads and the like qualify under this.
Returns: Boolean
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.IsWorld]Entity.IsWorld [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionReturns true if the entity is worldspawn (if the entity is part of the map). Floors, walls, roads.. etc...
Used onNewerShared.png
Code
 
function TOOL:LeftClick( trace )
 
	if(trace.Entity:IsWorld()) then
 
		Msg("Entity is the World!\n");
 
	end
 
end
 
OutputEntity is the World!


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox