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.
[08:08 pm]
anoeth47 -- Can I get a moderator/lord of the forum to clean up my topics - delete posts not really part of the topic.
[07:11 pm]
anoeth47 -- Can you download from forum if not a member?
[07:07 pm]
anoeth47 -- Thank you NudeRaider much cleaner
[04:24 am]
anoeth47 -- Sie_Sayoka >>> Thanks!!! Got the png's to show up in Map Showcase
[2026-4-22. : 10:20 pm]
anoeth47 -- Sweet
[2026-4-22. : 7:48 pm]
NudeRaider -- https://staredit.net/381642/ really makes you appreciate (again) how good sc music is.
[2026-4-18. : 3:57 am]
NudeRaider -- https://staredit.net/381600/ You have 5 minutes, then you can only edit your posts.
[2026-4-17. : 4:05 pm]
NudeRaider -- DarkenedFantasies
DarkenedFantasies shouted: you eat lots of beans
:lol:
Please log in to shout.


Members Online: anoeth47