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.
[10:46 am]
UndeadStar -- :wob:
[03:34 pm]
Symmetry -- :wob:
[2026-7-01. : 4:42 am]
Zycorax -- :wob:
[2026-6-30. : 6:38 pm]
Ultraviolet -- :wob:
[2026-6-29. : 2:13 pm]
Vrael -- pee poo sibling
[2026-6-28. : 7:00 pm]
Symmetry -- poo poo papa
[2026-6-28. : 2:46 pm]
lil-Inferno -- pee pee child
[2026-6-27. : 6:10 pm]
Ultraviolet -- sweet summer child
[2026-6-26. : 10:31 am]
NudeRaider -- blessed innocent soul knows nothing of the strife we had before EUDs were discovered :teehee:
[2026-6-23. : 3:29 am]
DarkenedFantasies -- Probably just didn't care. For example, at some point before release, they've updated the graphics of some of the Protoss buildings (Forge, CyberCore, Citadel, Observatory, Arbiter Tribunal), but instead of properly re-rendering them with edited 3D models, they did crappy copy-paste jobs on the rendered graphics.
Please log in to shout.


Members Online: Zoan, Roy, DarkenedFantasies