I've got to triggers which aren't working, and im not sure what im doing wrong.
This is supposed to create a series of waves of frost(based off breath of frost) around the hero in a circular fashion based on the heroes level.
Level 1 should have 1 wave go 180 degrees, and another 360
Level 2 should have waves go at 90, 180, 270, 360
so on.
I've tested this with heroes of level 1 and 31. Each time it only loops twice.
(I only get 2 "moo" messages") And each time there is only 1 wave, or all the waves go in the same direction.
This spell is suposed to have dummy units cast chain lightning
on all enemies within 900, then have dummy units at each unit cast chain lightning on the unit if the heroes level is > 11, and again if > 19.
The problem is that only 1 chain lightning is cast.
This is supposed to create a series of waves of frost(based off breath of frost) around the hero in a circular fashion based on the heroes level.
Level 1 should have 1 wave go 180 degrees, and another 360
Level 2 should have waves go at 90, 180, 270, 360
so on.
I've tested this with heroes of level 1 and 31. Each time it only loops twice.
(I only get 2 "moo" messages") And each time there is only 1 wave, or all the waves go in the same direction.
Code:
FrostNova
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Frost Nova
Actions
Set TempPoint = (Position of (Casting unit))
For each (Integer A) from 1 to (2 x (Hero level of (Casting unit))), do (Actions)
Loop - Actions
Game - Display to (All players) the text: moo
Set FrostWavePoint = (TempPoint offset by 256.00 towards ((Real((Integer A))) x (360.00 / (2.00 x (Real((Hero level of (Casting unit))))))) degrees)
Unit - Create 1 Dummy for (Owner of (Casting unit)) at TempPoint facing Default building facing degrees
Unit - Add Wave of Frost (Level 3) to (Last created unit)
Unit - Order (Last created unit) to Neutral - Breath Of Frost FrostWavePoint
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation(udg_FrostWavePoint)
Custom script: call RemoveLocation(udg_TempPoint)
This spell is suposed to have dummy units cast chain lightning
on all enemies within 900, then have dummy units at each unit cast chain lightning on the unit if the heroes level is > 11, and again if > 19.
The problem is that only 1 chain lightning is cast.
Code:
Wrath
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Wrath
Actions
Set TempPoint = (Position of (Casting unit))
Set TempGroup = (Units within 900.00 of TempPoint matching (((Owner of (Matching unit)) is an enemy of (Owner of (Casting unit))) Equal to True))
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Unit - Create 1 Dummy for (Owner of (Casting unit)) at TempPoint facing Default building facing degrees
Unit - Add Chain Lightning (Level 3) to (Last created unit)
Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation(udg_TempPoint)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Hero level of (Casting unit)) Greater than 11
Then - Actions
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Set TempPoint = (Position of (Picked unit))
Unit - Create 1 Dummy for (Owner of (Casting unit)) at TempPoint facing Default building facing degrees
Unit - Add Chain Lightning (Level 3) to (Last created unit)
Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation(udg_TempPoint)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Hero level of (Casting unit)) Greater than 19
Then - Actions
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Set TempPoint = (Position of (Picked unit))
Unit - Create 1 Dummy for (Owner of (Casting unit)) at TempPoint facing Default building facing degrees
Unit - Add Chain Lightning (Level 3) to (Last created unit)
Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation(udg_TempPoint)
Else - Actions
Custom script: call DestroyGroup(udg_TempGroup)