Hmm... Since I can't go back and zorch my
previous post in this thread, I'll just post the modified version of the _NPC_Flee
script here.
NWScript:
void main()
{
object oCreature;
object oRunTo;
int iRunLikeHell = 0;
oRunTo = GetWaypointByTag("NPC_Flee1");
oCreature = GetLastPerceived();
if (GetObjectByTag("ENEMY", 1) == oCreature)
{
iRunLikeHell = 1;
}
if (iRunLikeHell = 1)
{
ActionMoveToObject(oRunTo, TRUE);
}
}
This version doesn't make the NPCs "stutter" when they're fleeing. Once they
see an enemy, they're off to the races.
Requirements: Waypoints and enemy tags (documented in the script).
_________________
Truly, you have a dizzying intellect.
|