My map needs hyper triggers to work well and I have a spell that goes like such: It follows the observer and keeps creating scouts at that location to attack.
Conditions: Blah Blah cast spell stuff
Actions: Center location over (spellcaster)
Create 1 (spell centerer) at location
Center location over (spell centerer)
Create 2 (spell attackers) at location
wait 200ms
Kill 2 (spell attackers)
Center location over (spell centerer)
Create 2 (spell attackers) at location
wait 200ms
Kill 2 (spell attackers)
Preserve trigger
The wait triggers make it really slow and long.
I heard you can use death counters to avoid wait blocks but I'm not sure how to go about doing this.
None.
First you need a death counter, preferably something not used in your map. Ie, Cantina.
Make a trigger saying that
Conditions:
Current Player suffers at least 1 deaths of Cantina
Actions:
Modify deaths for Current Player: Add 1 for Cantina
Preserve Trigger
Now, 11.9 (about 12) death counts is equal to one second with hypertriggers. So, 2.4 death counters is equal to 200 milliseconds... hrm, that might be a problem. May have to round a bit, if that's ok with you.
Conditions:
Current Player suffers at least 4 deaths of Cantina
Actions
(do whatever the spell is supposed to do)
Modify deaths for Current Player: Set to 0 for Cantina (or set to 1 if you want the timer to restart)
Preserve trigger
I don't think I explained it very well... gah
.
None.
That's what I thought. I'll need to break up the trigger into multiple parts because of the multiple waits correct? What I want is for it to do the first part of the spell then do it again so it'll look like:
SPELL
Conditions: cast spell (built zealot at location)
Actions:set switch (death counter)
Kill zealot at location
preserve trigger
DEATH COUNTER
Conditions: switch death counter is set
action: add 2 for unused unit
preserve trigger
SPELL ACTIONS:
Condition: deaths is 2 unused unit for current player
Actions do spell attack
set deaths to 3 of unused unit for current player
preserve trigger
SPELL ACTIONS: (I want it to attack twice per spell cast)
Conditions: Deaths 5 for unused unit
Actions: Spell attack
clear switch Death counter
preserve trigger
None.
If you're properly using hyper triggers in your map, each trigger cycles runs after ~ 1/12 of a second, roughly 84ms, so we typically use the conversion rate 12 death counts = 1 second. So 168ms = 2 DC, and 252 ms = 3 DC. Unfortunately you can't do exactly 200ms, but who can tell the difference. I'll use 168ms instead. The way I would set up your triggers is like this:
Conditions:
Exactly 0 deaths of DC
Bring 1 zealot to Spell area
Actions:
Set DC to 5
Center Spell Location
Create 2 Spell Unit @ Spell Location
preserve trigger
Conditions:
Exactly 3 deaths of DC
Actions:
Center Spell Location
Kill 2 Spell Unit @ Spell Location
Create 2 Spell Unit @ Spell Location
preserve trigger
Conditions:
Exactly 1 deaths of DC
Actions:
Center Spell Location
Kill 2 Spell Unit @ Spell Location
preserve trigger
Conditions:
Current player has suffered at least 1 deaths of DC
Actions:
Subtract 1 deaths of DC for current player
preserve trigger
None.
It works great! except I was busy adding the triggers before your advice Vrael, so I used an add unit death instead of a subtract unit death. I ended up using the wait trigger for the last spell attack to add a sort of spell duration variability to make it interesting. Well that should be the most complicated of my spells so all thats left is the time consuming spells and balancing it all.
None.
Wait -- you're using deaths for Current Player, and it's not breaking? Because I used the Deaths condition and Set Deaths action for Current Player units in a vehicle system I made a
long time ago, and it seemed to treat Current Player like a separate (extended) player.
Also, guys, we have a "trigger" BBCode. Just press the "Trigger" button, and you can type stuff in to get a formatted Trigger.
Player 2Force 3Current Player has suffered 3 deaths of Terran Marine.Preserve trigger.
None.
Wait -- you're using deaths for Current Player, and it's not breaking? Because I used the Deaths condition and Set Deaths action for Current Player units in a vehicle system I made a long time ago, and it seemed to treat Current Player like a separate (extended) player.
Well it works for me. Haven't really gotten to test multiplayer.
None.
Wait -- you're using deaths for Current Player, and it's not breaking? Because I used the Deaths condition and Set Deaths action for Current Player units in a vehicle system I made a
long time ago, and it seemed to treat Current Player like a separate (extended) player.
Also, guys, we have a "trigger" BBCode. Just press the "Trigger" button, and you can type stuff in to get a formatted Trigger.
Player 2Force 3Current Player has suffered 3 deaths of Terran Marine.Preserve trigger. Current player works just fine.
Your Demo trigger would be run once for each player in Force 3 and Player 2 (Player 2 at most once if also in Force 3) in the order of first player to eighth player (whichever are in trigger owners) each time with that player owner in place of current player.
But I'm sure you know all that.
None.
Wait -- you're using deaths for Current Player, and it's not breaking? Because I used the Deaths condition and Set Deaths action for Current Player units in a vehicle system I made a
long time ago, and it seemed to treat Current Player like a separate (extended) player.
Also, guys, we have a "trigger" BBCode. Just press the "Trigger" button, and you can type stuff in to get a formatted Trigger.
Player 2Force 3Current Player has suffered 3 deaths of Terran Marine.Preserve trigger. Current player works just fine.
Your Demo trigger would be run once for each player in Force 3 and Player 2 (Player 2 at most once if also in Force 3) in the order of first player to eighth player (whichever are in trigger owners) each time with that player owner in place of current player.
But I'm sure you know all that.
I know how Current Player works. It just didn't seem to work with DCs when I used it. The trigs ran for each player in the game, but when it came to the DCs, it seemed to use the same counter for all players -- as if Current Player were given its own DCs.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
DJC please don't confuse shadow. DCs for Current Player is a standard method we're using for years. It's definitely working.
When you got a problem with them, make a thread about it and we'll solve the problem but please refrain from spreading false rumors.