- Joined
- Jan 12, 2010
- Messages
- 13
Hello forum fellows.
I'm getting stuck in my Map with a simple problem of Loop. The loop doesn't acts as I expected, and I have no idea why... Here's the trigger:
EDIT: To make your understanding easier, my goal with this trigger is
First> To detect which units have both "Poison Wave" and "Disease Plague"
Second> To make these units get a new Poison that lasts for 8 seconds, dealing (2% MAX Caster HP + Caster Level) damage per second.
The problem> The "For Each Integer A" Loop only occurs once, and even if I apply the damage, it will only proc one time.
The question> Why is the Loop ending sooner than expected? It was intended to range from 1 to 8, increasing by 1 for each second.
-> In my opinion, the Trigger should Display the A integer variable number in each second for all players. ie:
1... (1 second later)
2... (1 second later)
3... (1 second later)
4... (1 second later)
But it Only displays "1 1 1" (it was the number of targets wich had both Poison wave and Disease buffs, as the "Matching condition" dictates) and then the Loop simply ends, as if it had already hit its maximum value (8). Wtf is going on? any ideas?
I'm getting stuck in my Map with a simple problem of Loop. The loop doesn't acts as I expected, and I have no idea why... Here's the trigger:
EDIT: To make your understanding easier, my goal with this trigger is
First> To detect which units have both "Poison Wave" and "Disease Plague"
Second> To make these units get a new Poison that lasts for 8 seconds, dealing (2% MAX Caster HP + Caster Level) damage per second.
The problem> The "For Each Integer A" Loop only occurs once, and even if I apply the damage, it will only proc one time.
The question> Why is the Loop ending sooner than expected? It was intended to range from 1 to 8, increasing by 1 for each second.
-> In my opinion, the Trigger should Display the A integer variable number in each second for all players. ie:
1... (1 second later)
2... (1 second later)
3... (1 second later)
4... (1 second later)
But it Only displays "1 1 1" (it was the number of targets wich had both Poison wave and Disease buffs, as the "Matching condition" dictates) and then the Loop simply ends, as if it had already hit its maximum value (8). Wtf is going on? any ideas?
-
Poison Wave
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Poison Wave (Reworked)
-
-
Actions
-
Set PWave_Caster = (Casting unit)
-
Set PWave_Damage = ((0.02 x (Max life of PWave_Caster)) + (Real((Level of PWave_Caster))))
-
Wait 2.00 seconds
-
Set PWave_Pickgroup = (Units in (Playable map area) matching ((((Matching unit) has buff Poison Wave ) Equal to True) and (((Matching unit) has buff Disease) Equal to True)))
-
Unit Group - Pick every unit in PWave_Pickgroup and do (Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
-
Game - Display to (All players) for 4.00 seconds the text: (String((Integer A)))
-
Wait 1.00 seconds
-
-
-
-
-
-