• [Help] Collison
    1 replies, posted
Hello there, I was hoping someone could assist me on my lua coding on collison. I have been trying to code in my gamemode so that npcs do not kill the player if the player is on the npcs spawn so i decided to attempt some collision detection but failed, how do I got about this? I have a large amount of npcs spawning at different times so I can't constantly make the npcs no collide with the player. Thank you.
You could use [B][URL="http://wiki.garrysmod.com/?title=Ents.FindInBox"]Ents.FindInBox[IMG]http://wiki.garrysmod.com/favicon.ico[/IMG][/URL][/B] around the spawning point to check if the player is in it. And if the player isn't then the NPC can spawn.
Sorry, you need to Log In to post a reply to this thread.