ents.FindInBox

From GMod Wiki

Jump to: navigation, search
Function
Syntax ents.FindInBox( Vector min, Vector max )
Where is this used?
Description:
Find all entities within a specified bounding box.
Returns: Table : Entity
Part of Library: Ents
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Ents.FindInBox]Ents.FindInBox [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionThis example finds all the entities near the origin of the map
Used onNewerShared.png
Code
local orgin_ents = ents.FindInBox( Vector(-32,-32,-32), Vector(32,32,32) )
OutputN/A


Additional Notes

 
function ClampWorldVector(vec)
	vec.x = math.Clamp( vec.x , -16380, 16380 )
	vec.y = math.Clamp( vec.y , -16380, 16380 )
	vec.z = math.Clamp( vec.z , -16380, 16380 )
	return vec
end
 

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox