Garry's Mod Wiki

Entity:IsWorld

boolean Entity:IsWorld()

Description

Returns if the entity is the map's Entity[0] worldspawn

Returns

1 boolean
isWorld

Example

Stool boilerplate for the ignite tool

function TOOL:LeftClick( trace ) local ent = trace.Entity if !ent or !ent:IsValid() or ent:IsPlayer() or ent:IsWorld() then return false end ...
Output: LeftClick will not run for no ent, invalid ents, players, or worldspawn.

Page Links


Special Pages


Wikis

?

Render Time: 68ms

Session 0
DB GetPage 6
Generate Html 1
SaveChanges 46
Render Body 0
Render Sidebar 12