Hey guyz!
Here is the spell I want to make:
Explosive Wire: The hero places a wire in front of him in 3 seconds. After that the wire explodes and dmages units close to it.
Here are the triggers:
Can somebody help me find the error(s) ?
+Rep for helpful answers
Here is the spell I want to make:
Explosive Wire: The hero places a wire in front of him in 3 seconds. After that the wire explodes and dmages units close to it.
Here are the triggers:
-
Explosive Wire Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Explosive Wire (W)
-
Actions
- Set EW_Caster = (Casting unit)
- Set EW_Loc[0] = (Position of EW_Caster)
- Set EW_Distance = (600.00 x 0.03)
- Set EW_Time = 3.00
- Set EW_Angle = (Facing of EW_Caster)
- Set EW_Times = 1
- -------- Lightning Create --------
- Set EW_Loc[1] = (EW_Loc[0] offset by EW_Distance towards EW_Angle degrees)
- Lightning - Create a Finger of Death lightning effect from source EW_Loc[0] to target EW_Loc[1]
- Set EW_Lightning = (Last created lightning effect)
- -------- Saving --------
- Hashtable - Save EW_Angle as 0 of (Key (Casting unit)) in Explosive_Wire_Table
- Hashtable - Save EW_Distance as 1 of (Key (Casting unit)) in Explosive_Wire_Table
- Hashtable - Save EW_Time as 2 of (Key (Casting unit)) in Explosive_Wire_Table
- Hashtable - Save Handle OfEW_Loc[0] as 3 of (Key (Casting unit)) in Explosive_Wire_Table
- Hashtable - Save Handle OfEW_Lightning as 4 of (Key (Casting unit)) in Explosive_Wire_Table
- Hashtable - Save EW_Times as 5 of (Key (Casting unit)) in Explosive_Wire_Table
- -------- Adding Caster to Group --------
- Unit Group - Add (Casting unit) to EW_Group
- -------- Cleaning --------
- Custom script: call RemoveLocation(udg_EW_Loc[0])
- Custom script: call RemoveLocation(udg_EW_Loc[1])
-
Events
-
Explosive Wire Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in EW_Group and do (Actions)
-
Loop - Actions
- Set EW_Angle = (Load 0 of (Key (Picked unit)) from Explosive_Wire_Table)
- Set EW_Distance = (Load 1 of (Key (Picked unit)) from Explosive_Wire_Table)
- Set EW_Time = (Load 2 of (Key (Picked unit)) from Explosive_Wire_Table)
- Set EW_Loc[0] = (Load 3 of (Key (Picked unit)) in Explosive_Wire_Table)
- Set EW_Lightning = (Load 4 of (Key (Picked unit)) in Explosive_Wire_Table)
- Set EW_Times = (Load 5 of (Key (Picked unit)) from Explosive_Wire_Table)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- EW_Time Greater than 0.00
-
Then - Actions
- Set EW_Times = (EW_Times + 1)
- Set EW_Loc[2] = (EW_Loc[0] offset by (EW_Distance x (Real(EW_Times))) towards EW_Angle degrees)
- Lightning - Move EW_Lightning to source EW_Loc[0] and target EW_Loc[2]
- Hashtable - Save (EW_Time - 0.03) as 2 of (Key (Picked unit)) in Explosive_Wire_Table
- Hashtable - Save EW_Times as 5 of (Key (Picked unit)) in Explosive_Wire_Table
- Custom script: call RemoveLocation(udg_EW_Loc[2])
-
Else - Actions
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
- Set EW_Loc[3] = (EW_Loc[0] offset by (100.00 x (Real((Integer A)))) towards EW_Angle degrees)
- Special Effect - Create a special effect at EW_Loc[3] using Abilities\Spells\Demon\DemonBoltImpact\DemonBoltImpact.mdl
- Special Effect - Destroy (Last created special effect)
- Unit - Cause (Picked unit) to damage circular area after 0.00 seconds of radius 99.50 at EW_Loc[3], dealing 280.00 damage of attack type Spells and damage type Force
- Custom script: call RemoveLocation(udg_EW_Loc[3])
-
Loop - Actions
- Lightning - Destroy EW_Lightning
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Explosive_Wire_Table
- Unit Group - Remove (Picked unit) from EW_Group
-
For each (Integer A) from 1 to 6, do (Actions)
-
If - Conditions
- Custom script: call RemoveLocation(udg_EW_Loc[0])
-
Loop - Actions
-
Unit Group - Pick every unit in EW_Group and do (Actions)
-
Events
Can somebody help me find the error(s) ?
+Rep for helpful answers