I am making a fighting strategy and I wonder if I use this, it will be Randomized.
1. First I am going to make something of a loop.
| Trigger |
| Description: |
| Player 1 |
|
| Conditions: |
| ¤ Player 8 Has suffered deaths of exactly 1 Zergling |
| Actions: |
¤ Create 3 Dark templars at Location 5 for Player 8
|
¤ Wait 1 Millisecond
|
¤ Kill 1 Dark Templar at Location 5 for Player 8
|
¤ Wait 1 Millisecond
|
¤ Kill 1 Dark Templar at Location 5 for Player 8
|
¤ Wait 1 Millisecond
|
¤ Kill 1 Dark Templar at Location 5 for Player 8
|
¤ Wait 1 millisecond
|
¤ Set death counts for player 8: Set to 0 deaths of Dark Templar
|
| ¤ Preserve Trigger |
2. This is the first attack. (The Kakaru is just to make the attack finished).
| Trigger |
| Description: |
| Player 1 |
|
| Conditions: |
| ¤ Player has suffered exactly 1 deaths of Dark Templar |
| Actions: |
¤ Modify death counts for player 8: Set to 1 Kakaru
|
¤ Modify death counts for player 8: Set to 0 Zergling
|
| ¤ Preserve Trigger |
3. This is the second attack.
| Trigger |
| Description: |
| Player 1 |
|
| Conditions: |
| ¤ Player has suffered exactly 2 deaths of Dark Templar |
| Actions: |
¤ Modify death counts for player 8: Set to 2 Kakaru
|
¤ Modify death counts for player 8: Set to 0 Zergling
|
| ¤ Preserve Trigger |
4. Third attack.
| Trigger |
| Description: |
| Player 1 |
|
| Conditions: |
| ¤ Player has suffered exactly 3 deaths of Dark Templar |
| Actions: |
¤ Modify death counts for player 8: Set to 3 Kakaru
|
¤ Modify death counts for player 8: Set to 0 Zergling
|
| ¤ Preserve Trigger |
5. I am going to make the attack sucessful and then It's the computers turn, then I set the zergling to 1 death... but Will this actally work since i think it will just make the first attack since it is the first action.
Happy for some answers and support.
I'm quite confused about what you did... creating 3 templars, killing them, setting their kills to 0 and than check if you killed any?
If you want to randomize attacks, just make a trigger like this:
Players:
All players
Conditions:
Always
Actions:
Randomize 'switch 1'
Randomize 'switch 2'
Preserve trigger.
And add a hyper trigger.
Than just check all four versions:
clear clear
clear set
set clear
set set
and for each do what you want to happen.
If you need just 3, tell it to re-randomize and check again on the last option so that only 3 are left doing something.
If you need more than 4 options - use more switches.
Chronophobia: When you kill a unit with triggers there death count does not change. You have to ither modify there deaths or kill them by damageing them.
If the killing a DT with a trigger did change the death counts it still wouldn't be random. After each wait the other triggers would fire and the first one would pick up that there was one death. So you would of created a loop that just went like this ( Trig1, Trig2, Trig2, Trig2, repeat)
But because of the death probolem all that will happen is you will constantly see DTs being spawned and killed after player 8 gets one zergling death.
Check out the randomization tutorial in the database if you want to randomize something.
And here is one of my favorate quotes about this.
Just because you don't understand the results doesn't mean it is random
- Me
QUOTE((U)Bolt_Head @ Mar 4 2005, 09:03 AM)
Chronophobia: When you kill a unit with triggers there death count does not change. You have to ither modify there deaths or kill them by damageing them.
If the killing a DT with a trigger did change the death counts it still wouldn't be random. After each wait the other triggers would fire and the first one would pick up that there was one death. So you would of created a loop that just went like this ( Trig1, Trig2, Trig2, Trig2, repeat)
But because of the death probolem all that will happen is you will constantly see DTs being spawned and killed after player 8 gets one zergling death.
Check out the randomization tutorial in the database if you want to randomize something.
And here is one of my favorate quotes about this.
Just because you don't understand the results doesn't mean it is random
- Me
[right][snapback]158311[/snapback][/right]
Hehe, yea i guessed so too. Thanks, but is it possible to make a randomizing switch with death counters like that?
Yeah if you have units kill the DT's, I suppose. But it wouldn't be as reliably random as switches randomize.
I would say no
"Just because you don't understand the results doesn't mean it is random"
having units kill the dts would give you pretty much the same results each time. Very little variance if any. If you intend on using death counters you have to rely on a timed event picked by the player, Compared to a constantly changing death counter loop.
Don't use units to kill the DT's, if anything use triggers to set the death count.
If you wanted to use a death counter, use triggers to constantly loop deaths of DT from 0 to 2, and when the player attacks, look at how many deaths of DT there are. Don't stop the loop, there is no need to. The way you have it, since you only start the loop after the player attacks, the result is always the same.
For a 'real' randomisation, use switches.