Aller au contenu

Photo

preventing enemies from running after the PC


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
In the current version of my mod it's possible for the player to run around for quite a while with a bunch of enemies after him and thus preventing these enemies from doing damage to friendly NPC's in combat. i would like to change this so that the enemies pretty quickly changes targets when the PC has been running away for a short while.

#2
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
I was thinking about doing that for other reasons (so enemies don't just run through your front lines). I haven't tried it yet, but what might work is define a Custom AI that reevaluates the threat tables in your script and then calls AI_DetermineCombatRound(). At least then you shouldn't have to alter any core scripts or move rules_core functionality into a custom creature script. You might also need to manually change the target if it takes too long for the AI to switch targets itself.

Modifié par FollowTheGourd, 28 août 2010 - 09:42 .