FunkySwerve wrote...
Replace the 1 in this line with iVictors:
oVictor = GetNearestObjectByTag("Gladiator", oCenter, 1);
THAT makes sense. I'll test that in my script right now.
-Tests it.-
'> Yes! Success! Flawless success. //Added by me to the Gladiator's on spawn
if (GetLocalInt(OBJECT_SELF, "Carpathian")== 1)
{
object oArea;
oArea = GetArea(OBJECT_SELF);
int nInt;
nInt = GetLocalInt(oArea, "Carpathians In Game");
nInt += 1;
SetLocalInt(oArea, "Carpathians In Game", nInt);
}
if (GetLocalInt(OBJECT_SELF, "Sacrentian")== 1)
{
object oArea;
oArea = GetArea(OBJECT_SELF);
int nInt;
nInt = GetLocalInt(oArea, "Sacrentians In Game");
nInt += 1;
SetLocalInt(oArea, "Sacrentians In Game", nInt);
}
if (GetLocalInt(OBJECT_SELF, "Darkheart")== 1)
{
object oArea;
oArea = GetArea(OBJECT_SELF);
int nInt;
nInt = GetLocalInt(oArea, "Darkhearts In Game");
nInt += 1;
SetLocalInt(oArea, "Darkhearts In Game", nInt);
}
ActionMoveToObject(GetObjectByTag("ArenaCenter"));
And...// Gladiator's OnDeath script by Robert Donald Paiser
void main()
{
ExecuteScript("nw_c2_default7", OBJECT_SELF);
if (GetLocalInt(OBJECT_SELF, "Carpathian")== 1)
{
object oArea;
oArea = GetArea(OBJECT_SELF);
int nInt;
nInt = GetLocalInt(oArea, "Carpathians In Game");
nInt -= 1;
SetLocalInt(oArea, "Carpathians In Game", nInt);
}
if (GetLocalInt(OBJECT_SELF, "Sacrentian")== 1)
{
object oArea;
oArea = GetArea(OBJECT_SELF);
int nInt;
nInt = GetLocalInt(oArea, "Sacrentians In Game");
nInt -= 1;
SetLocalInt(oArea, "Sacrentians In Game", nInt);
}
if (GetLocalInt(OBJECT_SELF, "Darkheart")== 1)
{
object oArea;
oArea = GetArea(OBJECT_SELF);
int nInt;
nInt = GetLocalInt(oArea, "Darkhearts In Game");
nInt -= 1;
SetLocalInt(oArea, "Darkhearts In Game", nInt);
}
object oArea;
oArea = GetArea(OBJECT_SELF);
if (GetLocalInt(oArea, "Carpathians In Game")==0 && GetLocalInt(oArea, "Sacrentians In Game")==0)
{
object oCenter;
oCenter = GetObjectByTag("ArenaCenter");
object oVictor;
int iVictors = 1;
while (iVictors <= 10)
{
oVictor = GetNearestObjectByTag("Gladiator", oCenter, iVictors);
AssignCommand(oVictor, ClearAllActions());
AssignCommand(oVictor, ActionMoveToObject(GetObjectByTag("SouthGameExit")));
AssignCommand(oVictor, ActionJumpToObject(GetObjectByTag("BigExit")));
iVictors++;
}
object oSgate;
oSgate = GetObjectByTag("SouthGameGate");
SetLocked(oSgate, FALSE);
AssignCommand(oSgate, ActionOpenDoor(oSgate));
AssignCommand(GetModule(), DelayCommand(20.0, AssignCommand(oSgate, ActionCloseDoor(oSgate))));
AssignCommand(GetModule(), DelayCommand(20.0, SetLocked(oSgate, TRUE)));
AssignCommand(GetModule(), DelayCommand(30.0, SetLocalInt(oArea, "Darkhearts In Game", 0)));
}
if (GetLocalInt(oArea, "Carpathians In Game")==0 && GetLocalInt(oArea, "Darkhearts In Game")==0)
{
object oCenter;
oCenter = GetObjectByTag("ArenaCenter");
object oVictor;
int iVictors = 1;
while (iVictors <= 10)
{
oVictor = GetNearestObjectByTag("Gladiator", oCenter, iVictors);
AssignCommand(oVictor, ClearAllActions());
AssignCommand(oVictor, ActionMoveToObject(GetObjectByTag("SouthGameExit")));
AssignCommand(oVictor, ActionJumpToObject(GetObjectByTag("BigExit")));
iVictors++;
}
object oSgate;
oSgate = GetObjectByTag("SouthGameGate");
SetLocked(oSgate, FALSE);
AssignCommand(oSgate, ActionOpenDoor(oSgate));
AssignCommand(GetModule(), DelayCommand(20.0, AssignCommand(oSgate, ActionCloseDoor(oSgate))));
AssignCommand(GetModule(), DelayCommand(20.0, SetLocked(oSgate, TRUE)));
AssignCommand(GetModule(), DelayCommand(30.0, SetLocalInt(oArea, "Sacrentians In Game", 0)));
}
if (GetLocalInt(oArea, "Sacrentians In Game")==0 && GetLocalInt(oArea, "Darkhearts In Game")==0)
{
object oCenter;
oCenter = GetObjectByTag("ArenaCenter");
object oVictor;
int iVictors = 1;
while (iVictors <= 10)
{
oVictor = GetNearestObjectByTag("Gladiator", oCenter, iVictors);
AssignCommand(oVictor, ClearAllActions());
AssignCommand(oVictor, ActionMoveToObject(GetObjectByTag("SouthGameExit")));
AssignCommand(oVictor, ActionJumpToObject(GetObjectByTag("BigExit")));
iVictors++;
}
object oSgate;
oSgate = GetObjectByTag("SouthGameGate");
SetLocked(oSgate, FALSE);
AssignCommand(oSgate, ActionOpenDoor(oSgate));
AssignCommand(GetModule(), DelayCommand(20.0, AssignCommand(oSgate, ActionCloseDoor(oSgate))));
AssignCommand(GetModule(), DelayCommand(20.0, SetLocked(oSgate, TRUE)));
AssignCommand(GetModule(), DelayCommand(30.0, SetLocalInt(oArea, "Carpathians In Game", 0)));
}
}
So basically, Nightmare, like your second variable tracking idea. I'm sooo happy this works!