Hello again forum.
This is another spell for my Space Orc Map... and unfortunately, it has some strange problems.
Sometimes the dummies spawn far from the caster, they don't appear simultaneously and stuff. Also the second triggger (the channel stopping does not seem to work)
Can anyone find the error(s) or at least help me improve the spell ?
What the spell should do is:
On cast creates a few dummies that 'aerial shackles' units within certain range of the target of the ability. When stopped, all of them should disappear.
This is another spell for my Space Orc Map... and unfortunately, it has some strange problems.
Sometimes the dummies spawn far from the caster, they don't appear simultaneously and stuff. Also the second triggger (the channel stopping does not seem to work)
Can anyone find the error(s) or at least help me improve the spell ?
What the spell should do is:
On cast creates a few dummies that 'aerial shackles' units within certain range of the target of the ability. When stopped, all of them should disappear.
-
Plasmic Prison Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Plasmic Prison (C)
-
-
Actions
-
Set PP_Caster = (Casting unit)
-
Set PP_Loc[0] = (Position of (Target unit of ability being cast))
-
Set PP_Loc[1] = (Position of PP_Caster)
-
For each (Integer A) from 1 to 7, do (Actions)
-
Loop - Actions
-
Unit - Create 1 dummy_spell for (Owner of PP_Caster) at PP_Loc[1] facing Default building facing degrees
-
Set PP_Shooter = (Last created unit)
-
Unit - Add plasmic_Prison_dummy to PP_Shooter
-
Unit Group - Pick every unit in (Units within 300.00 of PP_Loc[0]) 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
-
((Picked unit) has buff Plasmic Bound ) Equal to False
-
((Picked unit) is dead) Equal to False
-
((Picked unit) is A structure) Equal to False
-
((Picked unit) belongs to an enemy of (Owner of PP_Caster)) Equal to True
-
-
-
-
Then - Actions
-
Unit Group - Add (Picked unit) to PP_Targets
-
-
Else - Actions
-
-
-
-
Set PP_Target = (Random unit from PP_Targets)
-
Unit - Order PP_Shooter to Human Dragonhawk Rider - Aerial Shackles PP_Target
-
Unit - Add a 8.00 second Generic expiration timer to PP_Shooter
-
Hashtable - Save Handle OfPP_Shooter as (Integer A) of (Key (Casting unit)) in Plasmic_Hash
-
Unit Group - Remove all units from PP_Targets
-
-
-
Custom script: call RemoveLocation(udg_PP_Loc[0])
-
Custom script: call RemoveLocation(udg_PP_Loc[1])
-
-
-
Plasmic Prison Stop
-
Events
-
Unit - A unit Stops casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Plasmic Prison (C)
-
-
Actions
-
Set PP_Caster = (Casting unit)
-
For each (Integer A) from 1 to 7, do (Actions)
-
Loop - Actions
-
Set PP_Removable = (Load (Integer A) of (Key (Casting unit)) in Plasmic_Hash)
-
Unit - Order PP_Removable to Stop
-
Unit - Remove PP_Removable from the game
-
-
-
Hashtable - Clear all child hashtables of child (Key (Casting unit)) in Plasmic_Hash
-
-