So, I have always wanted to make a spell like the arrow of the Priestess of the Moon from DotA. I have finally found a way to make such a spell - hashtables.
But there is something I can not figure out.
Here is the trigger problem:
I wanted to ask what the condition in the SECOND If/Then/Else func should be ? (The one when the projectile meets a hostile unit) I just can't figure it out ...
That is the problem part:
Please give some ideas
But there is something I can not figure out.
Here is the trigger problem:
-
Toxin Projectile Loop
-
Events
-
Time - Every 0.50 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in TP_Group and do (Actions)
-
Loop - Actions
-
Set TP_Posit = (Position of (Picked unit))
-
Set TP_Degree = (Load (Key Toxin_Angle) of (Key (Picked unit)) from Toxin_Pr_Hash)
-
Set TP_Time = (Load (Key Toxin_Time) of (Key (Picked unit)) from Toxin_Pr_Hash)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TP_Time Greater than 0.00
-
-
Then - Actions
-
Unit - Order (Picked unit) to Move To (TP_Posit offset by 135.00 towards TP_Degree degrees)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Region centered at TP_Posit with size (70.00, 70.00)) contains (Random unit from (Units owned by (Random player from (All enemies of (Owner of (Picked unit))))))) Equal to True
-
-
Then - Actions
-
Special Effect - Create a special effect at TP_Posit using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
-
Special Effect - Create a special effect at TP_Posit using Units\NightElf\Wisp\WispExplode.mdl
-
Unit - Order (Picked unit) to Neutral - Kaboom! TP_Posit
-
Unit Group - Remove (Picked unit) from TP_Group
-
Custom script: call RemoveLocation( udg_TP_Posit )
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Toxin_Pr_Hash
-
-
Else - Actions
-
Hashtable - Save (TP_Time - 1.00) as (Key Toxin_Time) of (Key (Picked unit)) in Toxin_Pr_Hash
-
-
-
-
Else - Actions
-
Special Effect - Create a special effect at TP_Posit using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
-
Special Effect - Create a special effect at TP_Posit using Units\NightElf\Wisp\WispExplode.mdl
-
Unit - Order (Picked unit) to Neutral - Kaboom! TP_Posit
-
Unit Group - Remove (Picked unit) from TP_Group
-
Custom script: call RemoveLocation( udg_TP_Posit )
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Toxin_Pr_Hash
-
-
-
-
-
-
I wanted to ask what the condition in the SECOND If/Then/Else func should be ? (The one when the projectile meets a hostile unit) I just can't figure it out ...
That is the problem part:
-
If - Conditions
-
((Region centered at TP_Posit with size (70.00, 70.00)) contains (Random unit from (Units owned by (Random player from (All enemies of (Owner of (Picked unit))))))) Equal to True
-
Please give some ideas