HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help with triggers!

04-17-2008, 12:17 AM#1
WarGod-X
I've got a map that requires some tricky trigs, so let me lay out the basics first. I'm doing a map where there are 4 teams of 3 players a 5x5 grid, and if you stay in a square for 15 seconds, your whole team is granted a certain ability. The abilities are set up in the grid as follows:

BASE1 - Phase - Stealth Walk - Phase - BASE2
Phase - Mind Blast - Blink - Mind Blast - Phase
Stealth Walk - Blink - Volley - Blink - Stealth Walk
Phase - Mind Blast - Blink - Mind Blast - Phase
BASE3 - Phase - Stealth Walk - Phase - BASE4

WHAT I NEED:
-There will be a circle of power in each square that will change color according to who captures the square. note: each team member will have the same player color, ie. Red team, Blue team, Green team, Purple team.
-The ability needs to be removed from all team members when their square is taken over. However, it needs to NOT be removed if there is still another square owned of the same ability type. ie. if a team owns 2 blink squares, the ability should NOT be removed if only 1 gets taken over.
-When the square is owned by a team member, the timer needs to NOT be set off by another team member (so a team member won't capture his own team's square, makes no sense).

I've been attempting this set of triggers for days now, and I keep running into walls. Someone please guide me through this. Thanks in advance!

EDIT
Here's what I've got so far, using the Blink ability as a dummy. I'll have to use one of these triggers for each individual region, all 21 of them. That's gonna be a pain.

Event:
A Unit enters [Spell region 1]

Conditions:
[none]

Actions:
-Set BLINK[Player number of (entering unit)] = true
-Wait 1.00 seconds
-If BLINK[Player number of (entering unit)] = false then do (skip remaining actions) else (do nothing).
-Game - Display to Player (owner of entering unit) the text: 15
-Wait 1.00 seconds
-If BLINK[Player number of (entering unit)] = false then do (skip remaining actions) else (do nothing).
-Game - Display to Player (owner of entering unit) the text: 14
-Wait 1.00 seconds
-If BLINK[Player number of (entering unit)] = false then do (skip remaining actions) else (do nothing).
-Game - Display to Player (owner of entering unit) the text: 13

and keep going all the way down...

-Wait 1.00 seconds
-If BLINK[Player number of (entering unit)] = false then do (skip remaining actions) else (do nothing).
-Game - Display to Player (owner of entering unit) the text: 2
-Wait 1.00 seconds
-If BLINK[Player number of (entering unit)] = false then do (skip remaining actions) else (do nothing).
-Game - Display to Player (owner of entering unit) the text: 1
-Wait 1.00 seconds
-If BLINK[Player number of (entering unit)] = false then do (skip remaining actions) else (do nothing).
-Game - Display to (All Players) the text [(Player name) has captured (ability name)]
-Unit - Change ownership of (Circle of Power 01) to (owner of entering unit)

END TRIGGER.

So that's my countdown trigger. I've got another trigger that turns the BLINK variable to false when the unit leaves the region, so if the player leaves the region (or dies) the variable turns false and stops the timer. This is exactly where I'm stuck>>> I need a trigger that checks the player owner of each circle of power, and assigns the abilities to the whole team based on that.
04-17-2008, 05:53 AM#2
darkwulfv
Well, what will help us (and make us more willing to help you) is if you show us what you've done already that has gotten closest to working. From there, we can probably just show you what you're doing wrong instead of making the entire triggers for you.
04-17-2008, 01:46 PM#3
Gorman
Trigger:
Test Trigger
Collapse Events
Unit - A unit enters BlinkZone1 <gen>
Conditions
Collapse Actions
Collapse For each (Integer CountDownTimer) from 1 to 15, do (Actions)
Collapse Loop - Actions
Game - Display to (All players) the text: (String((15 - CountDownTimer)))
Wait 1.00 seconds
Collapse Unit Group - Pick every unit in (Units in BlinkZone1 <gen>) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
Collapse Then - Actions
Skip remaining actions
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
CountDownTime Equal to 15
Collapse Then - Actions
Collapse Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit))) and do (Actions)
Collapse Loop - Actions
Unit - Add Blink (Neutral) to (Picked unit)
Collapse Unit Group - Pick every unit in (Units in (Playable map area) matching (((Owner of (Matching unit)) Not equal to (Owner of (Triggering unit))) and ((ZoneControler[2] Not equal to (Player number of (Owner of (Matching unit)))) or ((ZoneControler[3] Not equal to (Player number of (Owner of (Matching unit)) or ((ZoneControler[4] Not equal to (Player number of (Owner of (Matching unit)))) and do (Actions)
Collapse Loop - Actions
Unit - Remove Blink (Neutral) from (Picked unit)
Set ZoneControler[1] = (Player number of (Owner of (Triggering unit)))
Collapse Else - Actions
Do nothing
ZoneControler[] is an array of the zone controlers, 1-4 are the blink zones in this example. The player numbers in the array show who controls them.

This trigger should allow people to control multiple zones, and lose them, etc etc without problems.

EDIT: i didnt see u wanted it for all allies, but that should be easy enough for you to change, but just say if u want me to change for u =)
04-17-2008, 04:46 PM#4
WarGod-X
Rad, thanks a lot. I'm about to try it out but I've got one question. What exactly is the CountDownTimer variable?
04-17-2008, 08:47 PM#5
burningice95
It's an integer