How do I check if a player touches/is inside/hits specific world brush entities?
2 replies, posted
Was thinking about how I would begin coding interactions between specific world entities (i.e. func_button, func_breakable, trigger_once).
I'm still fairly new to Gmod Lua myself, and was wondering if you guys could give me a little bit of how I would go about doing this.
Say, would it be possible if I made a player with certain attributes fall through a func_breakable than physically touching it? Or not triggering any triggers in the map?
Extend Player class (using metatable), to create you own "attribute", it is actually a function/metamethod for each player.
Now the main part:
[URL]https://gist.github.com/OmegaExtern/3e4c3efcfa9b2282fcea[/URL]
NOTE: Above gist is incomplete; I'll update it later to complete solution.
You could also try this: [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/ENTITY/Touch"]ENTITY/Touch(entity)[/URL]
[QUOTE=OmegaExtern;47656017]Extend Player class (using metatable), to create you own "attribute", it is actually a function/metamethod for each player.
Now the main part:
[URL]https://gist.github.com/OmegaExtern/3e4c3efcfa9b2282fcea[/URL]
NOTE: Above gist is incomplete; I'll update it later to complete solution.
You could also try this: [IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/ENTITY/Touch"]ENTITY/Touch(entity)[/URL][/QUOTE]
Thanks for the guidance, I got somewhere to start from now.
Sorry, you need to Log In to post a reply to this thread.