I made an ability for my map. There is a activation trigger, that sets the boolean flamethower = true. And it starts the ability loop, which damages units and applies a debuff.
As you can see the activation trigger sets the boolean to false after 14 seconds which is supposed to turn of the loop. This was all working fine, since I added spawning a dummy unit to apply a slow debuff inside of the damage loop. And now when the spell hits a unit it wont turn off and the boolean will stay true. And I cannot figure out why spawning a dummy unit would effect that. It only breaks when a unit is hit and damaged and it spawns a dummy unit. I suspect the Pick every unit in (Units in (Playable map area)) being the problem here which ends in an infinite loop. But then I dont understand why the boolean is not set to false. If you have any ideas please let me know.
As you can see the activation trigger sets the boolean to false after 14 seconds which is supposed to turn of the loop. This was all working fine, since I added spawning a dummy unit to apply a slow debuff inside of the damage loop. And now when the spell hits a unit it wont turn off and the boolean will stay true. And I cannot figure out why spawning a dummy unit would effect that. It only breaks when a unit is hit and damaged and it spawns a dummy unit. I suspect the Pick every unit in (Units in (Playable map area)) being the problem here which ends in an infinite loop. But then I dont understand why the boolean is not set to false. If you have any ideas please let me know.
-
Flamethrower Activate
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Flamethrower - Goblin Gunship
-
-
Actions
-
Trigger - Turn on Flamethrower Loop <gen>
-
Set VariableSet flamethrower_boolean[(Player number of (Owner of (Casting unit)))] = True
-
Set VariableSet flamethrower_caster[(Player number of (Owner of (Casting unit)))] = (Casting unit)
-
Set VariableSet flamethrower_level[(Player number of (Owner of (Casting unit)))] = (Level of Flamethrower - Goblin Gunship for (Casting unit))
-
Special Effect - Create a special effect attached to the weapon of (Casting unit) using Flamethrower.mdx
-
Set VariableSet flamethrower_specialeffect[(Player number of (Owner of (Casting unit)))] = (Last created special effect)
-
Wait 14.00 seconds
-
Set VariableSet flamethrower_boolean[(Player number of (Owner of (Casting unit)))] = False
-
-
-
Flamethrower Loop
-
Events
-
Time - Every 0.20 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
-
flamethrower_boolean[1] Equal to False
-
flamethrower_boolean[2] Equal to False
-
flamethrower_boolean[3] Equal to False
-
flamethrower_boolean[4] Equal to False
-
flamethrower_boolean[5] Equal to False
-
flamethrower_boolean[6] Equal to False
-
flamethrower_boolean[7] Equal to False
-
flamethrower_boolean[8] Equal to False
-
flamethrower_boolean[9] Equal to False
-
flamethrower_boolean[10] Equal to False
-
flamethrower_boolean[11] Equal to False
-
flamethrower_boolean[12] Equal to False
-
flamethrower_boolean[13] Equal to False
-
flamethrower_boolean[14] Equal to False
-
flamethrower_boolean[15] Equal to False
-
flamethrower_boolean[16] Equal to False
-
flamethrower_boolean[17] Equal to False
-
flamethrower_boolean[18] Equal to False
-
flamethrower_boolean[19] Equal to False
-
flamethrower_boolean[20] Equal to False
-
flamethrower_boolean[21] Equal to False
-
flamethrower_boolean[22] Equal to False
-
flamethrower_boolean[23] Equal to False
-
flamethrower_boolean[24] Equal to False
-
-
-
-
Then - Actions
-
For each (Integer A) from 1 to 24, do (Actions)
-
Loop - Actions
-
Set VariableSet flamethrower_caster[(Integer A)] = No unit
-
Special Effect - Destroy flamethrower_specialeffect[(Integer A)]
-
-
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
For each (Integer A) from 1 to 24, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
-
(flamethrower_caster[(Integer A)] is alive) Equal to True
-
flamethrower_boolean[(Integer A)] Equal to True
-
-
-
-
Then - Actions
-
Set VariableSet temppunkt = ((Position of flamethrower_caster[(Integer A)]) offset by flamethrower_min_lenght towards (Facing of flamethrower_caster[(Integer A)]) degrees.)
-
Set VariableSet temppunkt = (temppunkt offset by flamethrower_width towards ((Facing of flamethrower_caster[(Integer A)]) + 90.00) degrees.)
-
Set VariableSet temppunkt2 = ((Position of flamethrower_caster[(Integer A)]) offset by (flamethrower_min_lenght + flamethrower_lenght) towards (Facing of flamethrower_caster[(Integer A)]) degrees.)
-
Set VariableSet temppunkt2 = (temppunkt2 offset by flamethrower_width towards ((Facing of flamethrower_caster[(Integer A)]) - 90.00) degrees.)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(X of temppunkt) Greater than or equal to (X of temppunkt2)
-
-
Then - Actions
-
Set VariableSet flamethrower_x_big = (X of temppunkt)
-
Set VariableSet flamethrower_x_small = (X of temppunkt2)
-
-
Else - Actions
-
Set VariableSet flamethrower_x_big = (X of temppunkt2)
-
Set VariableSet flamethrower_x_small = (X of temppunkt)
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Y of temppunkt) Greater than or equal to (Y of temppunkt2)
-
-
Then - Actions
-
Set VariableSet flamethrower_y_big = (Y of temppunkt)
-
Set VariableSet flamethrower_y_small = (Y of temppunkt2)
-
-
Else - Actions
-
Set VariableSet flamethrower_y_big = (Y of temppunkt2)
-
Set VariableSet flamethrower_y_small = (Y of temppunkt)
-
-
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
-
(X of (Position of (Picked unit))) Greater than or equal to flamethrower_x_small
-
(X of (Position of (Picked unit))) Less than or equal to flamethrower_x_big
-
(Y of (Position of (Picked unit))) Greater than or equal to flamethrower_y_small
-
(Y of (Position of (Picked unit))) Less than or equal to flamethrower_y_big
-
((Picked unit) belongs to an enemy of (Owner of flamethrower_caster[(Integer A)]).) Equal to True
-
((Picked unit) is Magic Immune) Equal to False
-
((Picked unit) is A structure) Equal to False
-
((Picked unit) is alive) Equal to True
-
(flamethrower_caster[(Integer A)] is alive) Equal to True
-
flamethrower_boolean[(Integer A)] Equal to True
-
-
-
-
Then - Actions
-
Unit - Cause flamethrower_caster[(Integer A)] to damage (Picked unit), dealing (14.00 + (8.00 x (Real(flamethrower_level[(Integer A)])))) damage of attack type Normal and damage type Magic
-
Unit - Create 1 Dummy[Caster] for (Owner of flamethrower_caster[(Integer A)]) at (Position of flamethrower_caster[(Integer A)]) facing Default building facing degrees
-
Unit - Add Flamethrower Slow - Goblin Gunship to (Last created unit)
-
Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
Set VariableSet flamethrower_boolean[(Integer A)] = False
-
Special Effect - Destroy flamethrower_specialeffect[(Integer A)]
-
-
-
-
-
-
-
-