I’m trying to do a quest where a bunch on npcs follows a player to a place, then they get ambushed and all die.
I created a custom follow function since the ActionForceFollowObject() teleports npcs after some time if they get too far, they are 6 npcs and that caused in some places that they block the player surrounding him.
The custom function its simple:
void FollowNPC(object oTarget)
It works fine, they do follow the player all arround. I set it on the heartbeat of the NPCs like this:
if(!GetIsInCombat() && GetObjectSeen(GetLocalObject(OBJECT_SELF,“master”)))
I store the master object so they can call it every time, did this to recover the following after npcs engage combat.
The big issue I’m having it’s in transitions, either way triggers or clickable custom doors(not actual doors transitions). When a player uses the custom door, this script its attachet to teleport “in theory” everyone inside:
// Get the creature who triggered this event. object oPC = GetLastUsedBy(); // Find the location to which to teleport. object oTarget = GetWaypointByTag("LV426023inter001away"); // Teleport the PC. AssignCommand(oPC, ClearAllActions()); AssignCommand(oPC, JumpToObject(oTarget)); location oDestination = GetLocation(oTarget); int iFollow =GetLocalInt(oPC,"Following"); object oMarine1 = GetObjectByTag("Drake"); object oMarine2 = GetObjectByTag("CplHicks"); object oMarine3 = GetObjectByTag("Frost"); object oMarine4 = GetObjectByTag("Hudson"); object oMarine5 = GetObjectByTag("SergApone"); object oMarine6 = GetObjectByTag("Vasquez"); //Follower1 DelayCommand(0.5,AssignCommand(oMarine1,ActionJumpToObject(oTarget))); //Follower2 DelayCommand(0.5,AssignCommand(oMarine2,ActionJumpToObject(oTarget))); //Follower3 DelayCommand(0.5,AssignCommand(oMarine3,ActionJumpToObject(oTarget))); //Follower4 DelayCommand(0.5,AssignCommand(oMarine4,ActionJumpToObject(oTarget))); //Follower5 DelayCommand(0.5,AssignCommand(oMarine5,ActionJumpToObject(oTarget))); //Follower6 DelayCommand(0.5,AssignCommand(oMarine6,ActionJumpToObject(oTarget)));
At area transition triggers a similar script its writen. The Issue? NPCs are not traveling between areas the tags are unique
Anyone experienced with this kind of script before?