Hello! I want to implement a defend mechanism and I have been trying to find a way to disable AI attacks for a few days. My last attempt was with the
But it only works one time, any other subsequent calls cause the NPC to run at the enemy and follow it, without doing anything. I checked the value of the scripted flags for the NPC and it only shows the NoAttack flag. Any suggestions?
Thank you!
Agent.SetScriptedFags(Agent.AIScriptedFrameFlags.NoAttack)
But it only works one time, any other subsequent calls cause the NPC to run at the enemy and follow it, without doing anything. I checked the value of the scripted flags for the NPC and it only shows the NoAttack flag. Any suggestions?
Thank you!