- Joined
- Apr 15, 2016
- Messages
- 118
Recently I asked if it was possible to set a variable into another variable for this reason (World Editor Help Zone)
The spell is working normally. EXCEPT for what I know you're thinking right now. Yes, if there are two (or more) units of the same type (with counter helix) when they spin they cause damage and the damage they cause trigger the other helix, which triggers another helix, another HELIx and the game just closes itself.
Is there anyway I can fix this ? Giving Cooldown ? Making it not active when the damage came from a helix ? These are possible ways, but I don't have an IDEA how to do so.
NOTE: I suck at Jass.
NOTE2: If you find any leak or any variable or action mistake you're free to tell.
-
Counter Helix
-
Events
-
Game - GDD_Event becomes Equal to 0.00
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Counter Helix for GDD_DamagedUnit) Greater than 0
-
-
Then - Actions
-
Set HelixStartIndex = (HelixStartIndex + 1)
-
Set HelixUnit[HelixStartIndex] = GDD_DamagedUnit
-
Unit - Pause HelixUnit[HelixStartIndex]
-
Animation - Change HelixUnit[HelixStartIndex]'s animation speed to 250.00% of its original speed
-
Custom script: call SetUnitAnimationByIndex(udg_HelixUnit[udg_HelixStartIndex], 10)
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 250.00 of (Position of GDD_DamagedUnit) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of GDD_DamagedUnit)) Equal to True)) and (((Matching unit) is alive) Equal to True))) and do (Actions)
-
Loop - Actions
-
Unit - Cause GDD_DamagedUnit to damage (Picked unit), dealing 50.00 damage of attack type Hero and damage type Normal
-
-
-
Wait 0.30 seconds
-
Set HelixEndIndex = (HelixEndIndex + 1)
-
Animation - Change HelixUnit[HelixEndIndex]'s animation speed to 100.00% of its original speed
-
Unit - Unpause HelixUnit[HelixEndIndex]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HelixEndIndex Equal to HelixStartIndex
-
-
Then - Actions
-
Set HelixEndIndex = 0
-
Set HelixStartIndex = 0
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Is there anyway I can fix this ? Giving Cooldown ? Making it not active when the damage came from a helix ? These are possible ways, but I don't have an IDEA how to do so.
NOTE: I suck at Jass.
NOTE2: If you find any leak or any variable or action mistake you're free to tell.