On this map... There is a timer...
Each person starts with a flag(signifying they have completed the round, or that the game JUST started).
Each time EVERY person has a flag, the countdown timer is set to 45 and the flags are destroyed.
When a player has lost a life(signifying he/she completely lost that round), a flag will spawn for him, signifying he has "completed" the round.
If a player kills all the opposing forces, his forces are destroyed, and a flag is spawned signifying he completed the round.
When each person has completed the round, win or loose, the flags are spawned.
If a person has a flag at their base, they cannot move their units past a certain point(so they don't get a head start).
So I need to make triggers that do all of that...
The main problem is...
I can't find a way, that it only counts ACTIVE players... because if it checks for a flag for everybody, and a player doesn't exist, then they don't have a flag... so the next round can't start...
So far I've got...
Code
Condition:
Always();
Action(some irrelevant parts excluded on all triggers) :
SetCountdownTimer(SetTo, 45);
KillUnitAt(All,Flag,COMPLETED,All Players);
Comment("start timer + msg's");
Always();
Action(some irrelevant parts excluded on all triggers) :
SetCountdownTimer(SetTo, 45);
KillUnitAt(All,Flag,COMPLETED,All Players);
Comment("start timer + msg's");
Code
Condition:
Bring(P1, AtLeast, 1, Flag, COMPLETED);
Bring(All Players, AtLeast, 1, Zealot -=]|[1]|[=-, NOGO1);
Action:
MoveUnit(All, AnyUnit, All Players, NOGO1, PSPAWN1);
PreserveTrigger();
Comment("NOGO1");
Bring(P1, AtLeast, 1, Flag, COMPLETED);
Bring(All Players, AtLeast, 1, Zealot -=]|[1]|[=-, NOGO1);
Action:
MoveUnit(All, AnyUnit, All Players, NOGO1, PSPAWN1);
PreserveTrigger();
Comment("NOGO1");
Code
Condition:
CountdownTimer(Exactly, 0);
Accumulate(P1, AtLeast, 1, Ore);
Action:
KillUnitAt(All, Flag, Anywhere, All Players);
SetResources(P1, Subtract, 1, Ore);
CreateUnit(1, Zealot -=]|[1]|[=-, ESPAWN1, P8);
SetScore(P1, Add, 1, Custom);
PreserveTrigger();
Comment("p1 enemy spawn");
CountdownTimer(Exactly, 0);
Accumulate(P1, AtLeast, 1, Ore);
Action:
KillUnitAt(All, Flag, Anywhere, All Players);
SetResources(P1, Subtract, 1, Ore);
CreateUnit(1, Zealot -=]|[1]|[=-, ESPAWN1, P8);
SetScore(P1, Add, 1, Custom);
PreserveTrigger();
Comment("p1 enemy spawn");
Code
Condition:
Bring(P8, AtLeast, 1, Zealot -=]|[1]|[=-, END1);
Action:
KillUnitAt(1, LIFE, Anywhere, P1);
KillUnitAt(All, AnyUnit, ZONE1, All Players);
CreateUnit(1, Flag, LOST, P1);
DisplayText("YOU LOST A LIFE!", 4);
PreserveTrigger();
Comment("life lost");
Bring(P8, AtLeast, 1, Zealot -=]|[1]|[=-, END1);
Action:
KillUnitAt(1, LIFE, Anywhere, P1);
KillUnitAt(All, AnyUnit, ZONE1, All Players);
CreateUnit(1, Flag, LOST, P1);
DisplayText("YOU LOST A LIFE!", 4);
PreserveTrigger();
Comment("life lost");
-----------------
KEY:
ZONE1(LOCATION) = Player one's area of combat
END1(LOCATION) = The area the enemy makes it to for the player to loose a life
ESPAWN1(LOCATION) = Enemy Unit Spawn
PSPAWN1(LOCATION) = Player Unit Spawn
NOGO1(LOCATION) = Location that CANNOT be passed unless a player DOES NOT have a flag
COMPLETED(LOCATION) = Area that the 'flags' spawn
LIFE(UNIT) = A unit representing a 'life'
Zealot -=]|[1]|[=-(UNIT) = Main unit of the game, for both the player and the enemy
-----------------------
I only have half of what I need, if not less.
I'm looking for a fairly simple way to check if the player exists or not so I can make a trigger to restart the countdown timer if all existing players have a flag.
Thanks,
Sorry if I confused you.
x[Alkali]x
None.





