- Joined
- Jul 19, 2007
- Messages
- 855
I have imported an ability named "Dopple Orb" from a spellpack and it works like this. Shoot a Haunting Orb that when it collides with an enemy, it dissipates, dealing 80 damage to units in 220 AOE range, and creating a doppleganger of them for a short time. The dopplegangers lasts 15 seconds.
The problem is that it seems to even create dopplegangers of allied units too and dopplegangers of cropses! I want it to ONLY create dopplegangers of enemies that is hit by the orb and I don't want it to create dopplegangers of "Heroes", "Giants" or "Ancients" but I dunno really how to solve that.
And the last thing I want is that the dopplegangers should take 500% increased damage, like you can do with illusions of the "Mirror Image" ability.
The problem is that it seems to even create dopplegangers of allied units too and dopplegangers of cropses! I want it to ONLY create dopplegangers of enemies that is hit by the orb and I don't want it to create dopplegangers of "Heroes", "Giants" or "Ancients" but I dunno really how to solve that.
And the last thing I want is that the dopplegangers should take 500% increased damage, like you can do with illusions of the "Mirror Image" ability.
-
Dopple Orb Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Haunt
-
-
Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Casting unit)) Equal to (Player((Integer A)))
-
-
Then - Actions
-
Set VariableSet DO_Units[(Integer A)] = (Casting unit)
-
Set VariableSet DO_Target[(Integer A)] = (Target unit of ability being cast)
-
Set VariableSet DO_Point[(Integer A)] = (Position of DO_Units[(Integer A)])
-
Unit - Create 1 HauntDummy for (Owner of DO_Units[(Integer A)]) at DO_Point[(Integer A)] facing Default building facing degrees
-
Set VariableSet DO_Dummies[(Integer A)] = (Last created unit)
-
Unit - Order (Last created unit) to Attack DO_Target[(Integer A)]
-
Custom script: call RemoveLocation (udg_DO_Point[bj_forLoopAIndex])
-
-
Else - Actions
-
-
-
-
-
-
Dopple Orb Periodic
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
Unit - Order DO_Dummies[(Integer A)] to Attack DO_Target[(Integer A)]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(DO_Dummies[(Integer A)] is alive) Equal to True
-
(Number of units in (Units within 75.00 of (Position of DO_Dummies[(Integer A)]) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Mechanical) Equal to False)) and (((Owner of (Matching unit)) is an enemy of (Owner of DO_Du Greater than or equal to 1
-
-
Then - Actions
-
Set VariableSet DummiesGroup[(Integer A)] = (Units within (220.00 x 1.00) of (Position of DO_Dummies[(Integer A)]) matching ((((Owner of DO_Target[(Integer A)]) is an enemy of (Owner of DO_Dummies[(Integer A)]).) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching uni
-
Unit Group - Pick every unit in DummiesGroup[(Integer A)] and do (Actions)
-
Loop - Actions
-
Unit - Cause DO_Dummies[(Integer A)] to damage (Picked unit), dealing (85.00 x 1.00) damage of attack type Spells and damage type Universal
-
-
-
Unit Group - Remove all units of DummiesGroup[(Integer A)] from DummiesGroup[(Integer A)].
-
Set VariableSet DummiesGroup[(Integer A)] = (Units within (220.00 x 1.00) of (Position of DO_Dummies[(Integer A)]) matching ((((Owner of DO_Target[(Integer A)]) is an enemy of (Owner of DO_Dummies[(Integer A)]).) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching uni
-
Unit Group - Pick every unit in DummiesGroup[(Integer A)] and do (Actions)
-
Loop - Actions
-
Set VariableSet DO_Point[(Integer A)] = (Position of (Picked unit))
-
Unit - Create 1 (Unit-type of (Picked unit)) for (Owner of DO_Dummies[(Integer A)]) at DO_Point[(Integer A)] facing ((Facing of (Picked unit)) - 180.00) degrees
-
Animation - Change (Last created unit)'s vertex coloring to (0.00%, 55.00%, 100.00%) with 15.00% transparency
-
Unit - Add a (15.00 x 1.00) second Generic expiration timer to (Last created unit)
-
Custom script: call RemoveLocation (udg_DO_Point[bj_forLoopAIndex])
-
-
-
Unit - Explode DO_Dummies[(Integer A)].
-
Unit Group - Remove all units of DummiesGroup[(Integer A)] from DummiesGroup[(Integer A)].
-
-
Else - Actions
-
-
-
-
-