• Fleeing NPCs?
    2 replies, posted
Is it possible to have NPCs in my map who will run away from the player? But perhaps fight back if they find a gun? (not necessary for what I plan to do, but would be nice) Or would I have to write an original NPC script? I don't know lua but would be willing to learn a bit simply to achieve this. Move this to correct section if this is the wrong place to post this.
This would probably be more fitting in Lua. I don't know if you can make NPC's pick up guns. Maybe you could do this though. Make it so an NPC's relationship with you is scared, using an ai_relationship, and have a trigger over a gun to give it to him? I don't know if you could do it with guns that fall off enemies, though.
Um, well if you have a "ai_releationship" entity you can change the relationship to scared. And put some weapons in the map with the spawnflag, Reserved for NPC. Look up some stuff on the Valve Developer Community. [editline]04:02PM[/editline] I do believe it fits in this section, because it can be done in hammer.
Sorry, you need to Log In to post a reply to this thread.