j0r00 Posted November 5, 2015 Share Posted November 5, 2015 Is there a way to lock an NPC in place so that he won't be pushed if attacked by other NPCs? I tried to attach the following script code to an NPC in order to make it not moveable and not pushed around if it gets attacked But it didn't work, The NPC acts like a statue and doesn't perform any animations :( Scriptname haltedNPC extends ActorEvent OnInit()Actor me = Self as Actorme.setDontMove(true)me.setRestrained(true)me.EnableAI(false)EndEvent Any suggestions ? Link to comment Share on other sites More sharing options...
Veltoss Posted November 5, 2015 Share Posted November 5, 2015 Can you explain a bit more about what you are wanting the NPC to do? Is it supposed to be like a mannequin or target dummy? I'm no coder, but I imagine the no animation thing is from me.EnableAI(false). Does the NPC need to show other hit events, like the weapon hitting them or causing bleeding? If not, then just enable "Is Ghost" in the actor's edit window. This will make weapons go through it, and it shouldn't cause any hit events like staggering. I'm not entirely sure what's moving the NPC when it's getting attacked though, so this may not work. Link to comment Share on other sites More sharing options...
Recommended Posts