Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: A Mass Of Triggers...
A Mass Of Triggers...
Apr 23 2008, 9:13 pm
By: xAlkalix  

Apr 23 2008, 9:13 pm xAlkalix Post #1



Ok...

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");




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");




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");




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");



-----------------
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.

Apr 23 2008, 9:17 pm O)FaRTy1billion[MM] Post #2

👻 👾 👽 💪

You could reverse it... so no flag = completed round. Then you just check for no flags.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Apr 23 2008, 9:38 pm xAlkalix Post #3



*slaps self*



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-4-29. : 2:00 am]
l)ark_ssj9kevin -- hi jamal
[2026-4-29. : 12:18 am]
Heinermann -- memes
[2026-4-28. : 10:08 pm]
NudeRaider -- skeet-skeet, motherfucker
[2026-4-28. : 4:24 pm]
Vrael -- NudeRaider
NudeRaider shouted: Vrael boy, if you're not careful I'll moderate your sorry ass too!
gotta catch me first! skeet skeet skeet
[2026-4-26. : 1:58 pm]
lil-Inferno -- ya
[2026-4-25. : 11:50 pm]
JamaL -- Glad to see SEN will never die. Kudos to whoever is paying the hosting fees these days!
[2026-4-25. : 3:37 pm]
NudeRaider -- (-.-,)
[2026-4-25. : 3:35 pm]
Zoan -- ;o I thought that was a monkey emote
[2026-4-25. : 3:34 pm]
Zoan -- :mods:
[2026-4-25. : 3:34 pm]
Zoan -- :mods"
Please log in to shout.


Members Online: l)ark_ssj9kevin