- Joined
- Apr 1, 2017
- Messages
- 47
I’m creating an ability that is kinda like lightning shield but its stationary and with flames. To stop multiple flames stacking on each other I’m using check amount of units that are in range of TempPoint to make sure that there are none, but for some reason flames that are already there don’t get detected and flames continue to stack endlessly.
And also for some reason the last trigger doesn’t detect when unit stops channeling.
-
Burn Start
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Channel
-
-
Actions
-
Unit Group - Add (Triggering unit) to PaladinBurnGroup
-
Hashtable - Save Handle Of(Target unit of ability being cast) as 0 of (Key (Triggering unit)) in PaladinBurnHashtable
-
-
-
Burn Create flames
-
Events
-
Time - Every 0.25 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in PaladinBurnGroup and do (Actions)
-
Loop - Actions
-
Set Triggerer = (Picked unit)
-
Set OwnerOfTriggerer = (Owner of Triggerer)
-
Set Angle = (Angle + (Random real number between 80.00 and 100.00))
-
Set Distance = (Random real number between 160.00 and 180.00)
-
Set BurnTarget = (Load 0 of (Key (Picked unit)) in PaladinBurnHashtable)
-
Set TempPoint = ((Position of BurnTarget) offset by Distance towards Angle degrees)
-
Unit - Make Triggerer face BurnTarget over 0.00 seconds
-
Unit Group - Pick every unit in (Units within 200.00 of TempPoint matching (((Unit-type of (Matching unit)) Equal to Footman blue) and ((Unit-type of (Matching unit)) Equal to Footman red))) and do (Actions)
-
Loop - Actions
-
Unit Group - Add (Picked unit) to BurnMess
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in BurnMess) Equal to 0
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Random integer number between 1 and 5) Less than or equal to 2
-
-
Then - Actions
-
-------- Blue flame model --------
-
Unit - Create 1 Footman blue for OwnerOfTriggerer at TempPoint facing Default building facing degrees
-
Hashtable - Save (Random real number between 10.00 and 30.00) as 0 of (Key (Last created unit)) in PaladinBurnHashtable
-
Unit Group - Add (Last created unit) to BurnFlamesGroup
-
-
Else - Actions
-
-------- Red flame model --------
-
Unit - Create 1 Footman red for OwnerOfTriggerer at TempPoint facing Default building facing degrees
-
Hashtable - Save (Random real number between 10.00 and 30.00) as 0 of (Key (Last created unit)) in PaladinBurnHashtable
-
Unit Group - Add (Last created unit) to BurnFlamesGroup
-
-
-
-
Else - Actions
-
-
-
-
-
-
-
Burn Kill Flames
-
Events
-
Time - Every 0.50 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in BurnFlamesGroup and do (Actions)
-
Loop - Actions
-
Set BurnFlames = (Picked unit)
-
Custom script: set udg_BurnKey = GetHandleId(udg_BurnFlames)
-
Set BurnTimer = (Load 0 of BurnKey from PaladinBurnHashtable)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
BurnTimer Greater than 0.00
-
-
Then - Actions
-
Hashtable - Save (BurnTimer - 0.50) as 0 of BurnKey in PaladinBurnHashtable
-
-
Else - Actions
-
Hashtable - Clear all child hashtables of child BurnKey in PaladinBurnHashtable
-
Unit - Kill BurnFlames
-
Unit Group - Remove BurnFlames from BurnFlamesGroup
-
-
-
-
-
-
-
Burn Burn
-
Events
-
Time - Every 0.20 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in BurnFlamesGroup and do (Actions)
-
Loop - Actions
-
Set BurnPickedFlames = (Picked unit)
-
Unit Group - Pick every unit in (Units within 100.00 of (Position of BurnPickedFlames) matching (((Matching unit) is A structure) Equal to False)) and do (Actions)
-
Loop - Actions
-
Unit - Cause (Random unit from BurnFlamesGroup) to damage (Picked unit), dealing 20.00 damage of attack type Chaos and damage type Fire
-
-
-
Unit Group - Pick every unit in (Units within 150.00 of (Position of BurnPickedFlames) matching (((Matching unit) is A structure) Equal to False)) and do (Actions)
-
Loop - Actions
-
Unit - Cause (Random unit from BurnFlamesGroup) to damage (Picked unit), dealing 5.00 damage of attack type Chaos and damage type Fire
-
-
-
-
-
-
And also for some reason the last trigger doesn’t detect when unit stops channeling.
-
Burn Stop
-
Events
-
Unit - A unit Stops casting an ability
-
Unit - A unit Finishes casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Channel
-
-
Actions
-
Unit Group - Remove (Triggering unit) from PaladinBurnGroup
-
Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in PaladinBurnHashtable
-
Custom script: call RemoveLocation(udg_TempPoint)
-
-