• Entities Touching?
    1 replies, posted
Is there a function which returns all of the entities touching another entity?
Not as far as I know, but if you use the ENT.Touch hook ([url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexcdb2.html?title=ENT.Touch[/url]) then you can maintain a list accessible elsewhere in the program. [lua]myEnt.touching = {}; function myEnt:StartTouch( e ) self.touching[e:EntIndex()] = e; end function myEnt:EndTouch( e) self.touching[e:EntIndex()] = null; end[/lua]
Sorry, you need to Log In to post a reply to this thread.