- Joined
- Jan 14, 2017
- Messages
- 75
Hi there,
I created a trigger for a spell called Haunt, where the caster casts a bolt of shadow at the target, dealing 20 damage every second for 10 seconds to the target, or 20 healing every second for 10 seconds it if it is an undead, and then the missile returns to the caster. I've done almost everything myself, but I am confused to how to make the missile return to the caster. I also realized that the damage/healing over time effect doesn't work. My base spell is Death Coil. So, where are the errors in the damage/healing over time triggers and how do I make the missile return to the caster? I apologize for this thread being two questions.
I created a trigger for a spell called Haunt, where the caster casts a bolt of shadow at the target, dealing 20 damage every second for 10 seconds to the target, or 20 healing every second for 10 seconds it if it is an undead, and then the missile returns to the caster. I've done almost everything myself, but I am confused to how to make the missile return to the caster. I also realized that the damage/healing over time effect doesn't work. My base spell is Death Coil. So, where are the errors in the damage/healing over time triggers and how do I make the missile return to the caster? I apologize for this thread being two questions.
-
Haunt init
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Hashtable - Create a hashtable
-
Set hashtableforhaunt = (Last created hashtable)
-
Set HealUnit = (Target unit of ability being cast)
-
Set Sourceofhaunt = (Triggering unit)
-
-
-
Haunt cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Haunt
-
-
Actions
-
Hashtable - Save 10.00 as 0 of 0 in (Last created hashtable)
-
Hashtable - Save 10.00 as 0 of 1 in (Last created hashtable)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(HealUnit is Undead) Equal to True
-
-
Then - Actions
-
Unit Group - Add HealUnit to HealUnitGroup
-
-
Else - Actions
-
Unit Group - Add HealUnit to Hauntdamagegroup
-
-
-
-
-
Haunt loop
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in HealUnitGroup and do (Actions)
-
Loop - Actions
-
Set Haunthealtime = (Load 0 of (Key (Picked unit)) from (Last created hashtable))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Target unit of ability being cast) is Undead) Equal to True
-
Haunthealtime Greater than 0.00
-
-
Then - Actions
-
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 20.00)
-
Hashtable - Save (Haunthealtime - 1.00) as 0 of (Key (Picked unit)) in hashtableforhaunt
-
-
Else - Actions
-
Unit Group - Remove HealUnit from HealUnitGroup
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in hashtableforhaunt
-
-
-
Unit Group - Pick every unit in Hauntdamagegroup and do (Actions)
-
Loop - Actions
-
Set Hauntdamagetime = (Load 1 of (Key (Picked unit)) from (Last created hashtable))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Hauntdamagetime Greater than 0.00
-
-
Then - Actions
-
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 20.00)
-
Hashtable - Save (Hauntdamagetime - 1.00) as 0 of (Key (Picked unit)) in hashtableforhaunt
-
-
Else - Actions
-
Unit Group - Remove (Picked unit) from Hauntdamagegroup
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in hashtableforhaunt
-
-
-
-
-
-
-
-