ents.FindByClass

From GMod Wiki

Jump to: navigation, search
Function
Syntax ents.FindByClass( String class name )
Where is this used?
Description:
Find entities of a specified type.
Returns: Table : Entity
Part of Library: Ents
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Ents.FindByClass]Ents.FindByClass [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionThis example finds all of the prop_physics in the map
Used onNewerShared.png
Code
local props = ents.FindByClass("prop_physics")
OutputN/A


DescriptionThis example finds all of the npcs in the map
Used onNewerShared.png
Code
local npcs = ents.FindByClass("npc_*")
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox