Juggernaut
I don't know what to change it to
- Reaction score
- 33
I am having trouble making a spell work.
It's a channel based ability - Point targeted.
It picks units in the AoE and does some stuff.
Here is trigger, Why doesn't it work?
Second Part
EDIT: Fixed it. All by myself lol. Can be closed.
I don't know why, but unit group did not work in the second trigger, so I did another method.
Updated trigger.
It's a channel based ability - Point targeted.
It picks units in the AoE and does some stuff.
Here is trigger, Why doesn't it work?
Code:
Untitled Trigger 001
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Channel
Actions
Custom script: local unit udg_unit
Custom script: local group udg_Group
Custom script: local integer udg_integer
Custom script: local location udg_Point
Set Point = (Target point of ability being cast)
Set Group = (Units within (650.00 + (100.00 x (Real((Level of Channel for (Triggering unit)))))) of Point matching ((Matching unit) Not equal to (Triggering unit)))
Unit Group - Pick every unit in Group and do (Actions)
Loop - Actions
Set integer = (integer + 1)
Set unit[integer] = (Picked unit)
<Actions>
Trigger - Run Untitled Trigger 002 <gen> (checking conditions)
Code:
Untitled Trigger 002
Events
Conditions
Actions
Wait (3.00 + (0.50 x (Real((Level of Channel for (Triggering unit)))))) seconds
Set integer = (integer - 1)
<<ACTIONS>>
Custom script: set udg_Point = null
Custom script: set udg_unit[udg_integer] = null
Custom script: set udg_Group = null
Custom script: call DestroyGroup(udg_Group)
EDIT: Fixed it. All by myself lol. Can be closed.
I don't know why, but unit group did not work in the second trigger, so I did another method.
Updated trigger.