Yeah it's all in the scripting. I have zombies that will follow you across multiple areas. Sometimes you go to the shop, come out 5 minutes later and there are some zombies. So certainly through scripting you can get those results. It also seems to be related to hot puruit, so if something is already trying to attack you they will follow, whereas at times you will run by someone who is surpirsed and does not follow. It's definitely ai/script related, as FB suggests. So cross area waypoints has nothing to do with this, though it's a good idea to have it on. That would be for patrols and such that could find waypoints in areas other than the one they are currently located in.
Well here is a copy of my standard zombie script, at leas the hb:
//:://////////////////////////////////////////////////
//:: NW_C2_DEFAULT1
/*
Default OnHeartbeat script for NPCs.
This script causes NPCs to perform default animations
while not otherwise engaged.
This script duplicates the behavior of the default
script and just cleans up the code and removes
redundant conditional checks.
zombie hb wander around attack chickens if available. ffbj
*/
//:://////////////////////////////////////////////////
//:: Copyright © 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 12/22/2002
//:://////////////////////////////////////////////////
#include "nw_i0_generic"
void main()
{
if (GetIsInCombat()) return;
//group with others and attack pc
object oEnemy = GetNearestSeenEnemy();
object oPC = GetLastPerceived();
int iTalentHR = TalentSpellAttack(oEnemy);
string sWPTag1 = "wp_random";//seed tag of wp. wp's must be placed.
string sRan = IntToString(d6()); //change dsize for more wp
string sWPTag = sWPTag1 + sRan; //selects wp_random1-6
location lWP = GetLocation(GetNearestObjectByTag(sWPTag));
float fWait = StringToFloat(sRan);
if (GetAlignmentGoodEvil(oEnemy) != ALIGNMENT_EVIL)
{
TalentBuffSelf();
DelayCommand (fWait,ActionAttack (oEnemy, iTalentHR));
DelayCommand (7.0, ActionAttack (oEnemy));//slow, methodical, thoughtful, zombies
}
else
DelayCommand (1.0,ActionMoveToLocation(lWP,TRUE));
object oTarget;
oTarget = GetNearestObjectByTag("Chicken");
location lWP1 = GetLocation(oTarget);
location lWP2 = GetLocation(oEnemy);
if (GetIsObjectValid(oTarget))
{
ActionMoveToLocation(lWP1,TRUE);
ActionAttack (oTarget);
return;
}
else if ((GetIsObjectValid(oEnemy) && GetDistanceToObject(oEnemy) < 15.0) && !(GetIsInCombat()))
{
ActionMoveToLocation(lWP2,TRUE);
ActionAttack (oEnemy, iTalentHR);
}
else if (GetTag(oPC) == ("Zombie"))
ActionMoveToObject(oPC,FALSE);//group with other zombies
}
Of course there is more to them than this. For instance they can call rats when wounded, and they try to heal at evil altars. But usually once they have glommed onto you they are hard to shake off.
Modifié par ffbj, 05 août 2012 - 04:53 .