- Joined
- Jul 25, 2011
- Messages
- 1,065
Hello I wanted to make a spell that damages units in line. I made this trigger but it won't work properly. Is any thing wrong? It won't create the special effect and the ubersplat in line.
-
Thunder Smash Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Thunder Smash
-
Actions
- Set TP = (Position of (Triggering unit))
- Set TP2 = (Target point of ability being cast)
- Set Angle = (Angle from TP to TP2)
- Custom script: call RemoveLocation(udg_TP2)
-
For each (Integer A) from 1 to (4 + (Level of Thunder Smash for (Triggering unit))), do (Actions)
-
Loop - Actions
- Set TP2 = (TP offset by 100.00 towards Angle degrees)
- Custom script: call RemoveLocation(udg_TP)
- Ubersplat - Create ubersplat at TP2 of type Thunder Clap with color (100.00%, 100.00%, 100.00%) and 0.00% transparency (Enable paused state, Enable skipping birth time)
- Ubersplat - Destroy (Last created ubersplat)
- Special Effect - Create a special effect at TP2 using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Set TG = (Units within 50.00 of TP2)
-
Unit Group - Pick every unit in TG and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Picked unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
-
Then - Actions
- Set TP = (Position of (Picked unit))
- Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TP facing Default building facing degrees
- Unit - Order (Last created unit) to Attack Once (Picked unit)
- Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
- Custom script: call RemoveLocation(udg_TP)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call DestroyGroup(udg_TG)
- Set TP = TP2
- Custom script: call RemoveLocation(udg_TP2)
-
Loop - Actions
- Custom script: call RemoveLocation(udg_TP)
-
Events