Hello! I've been working on a new module for a while, and normally, after a ton of trial & error, I can figure out my scripting bugs. But I just can't figure this one out! It's been bugging the heck out of me, so I decided I'd bother everyone here and ask what I should do.
'>
Okay, so this script is set to the "OnExit" of an area that cannot be re-entered. What is was meant to do, is it removes Skye (oSkye) and Leon (oLeon) from the PC (oPC)'s party. It then makes both Skye and Leon jump to two different waypoints(oJumpTarget, and oJumpTarget2) in the next area.
But the thing is, it removes both Skye and Leon, but only Skye goes to her proper waypoint. Leon follows the PC to their waypoint, and follows the PC around the area as if he were a henchman.
"#include "x0_i0_henchman"
void main()
{
// Identify Skye, Leon and the PC.
object oSkye = GetObjectByTag("Skye");
object oLeon = GetObjectByTag("Leon");
object oPC = GetFirstPC();
// Remove Skye and Leon from Party.
ClearAllActions();
RemoveHenchman(oPC, oSkye);
RemoveHenchman(oPC, oLeon);
// Teleport Skye and Leon to Waypoints.
object oJumpTarget = GetObjectByTag("Skye_After_Prologue");
object oJumpTarget2 = GetObjectByTag("Leon_After_Prologue");
AssignCommand(oSkye, ActionJumpToObject(oJumpTarget));
AssignCommand(oLeon, ActionJumpToObject(oJumpTarget2));
}"
I'm thinking the reason is because Skye is first for all of the scripted actions. If this is the case, would someone be kind enough to tell me if there is a way to remove all henchies in one command?