Hi guys!
I'm working on my Sea Elemental hero, and I want to make a tsunami-like spell, which releases a wave of water. This wave "picks up" enemy units and knocks them back to the end of the wave.
Trigger initialization
The Running of Wave
The initialization of the Knockback System
What could be the problem? If I issue my hero to cast the spell, it quits, but doesn't generate alarms/errors. I think something with the "Tsunami Add" trigger is the problem, but I don't have any idea.
I'm working on my Sea Elemental hero, and I want to make a tsunami-like spell, which releases a wave of water. This wave "picks up" enemy units and knocks them back to the end of the wave.
Trigger initialization
-
Tsunami Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to (==) Tsunami
-
Actions
- Set TempUnit = SeaEle
- Set TempLoc = (Target point of ability being cast)
- Set TempLoc2 = (Position of SeaEle)
- Set Ts_Dist = (100.00 + ((Real((Level of Tsunami for (Triggering unit)))) x 175.00))
- Set Ts_Distance = (TempLoc2 offset by 100.00 towards (Angle from TempLoc2 to TempLoc) degrees)
- Trigger - Run Tsunami Add <gen> (ignoring conditions)
-
Events
The Running of Wave
-
Tsunami Add
- Events
-
Conditions
- (Ts_Distance matches (Center of (Region centered at TempLoc with size (100.00, 100.00)))) Equal to (==) False
-
Actions
- Special Effect - Create a special effect at Ts_Distance using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
- Special Effect - Destroy (Last created special effect)
-
Unit Group - Pick every unit in (Units within 87.50 of Ts_Distance matching ((((Matching unit) is in TempGroup) Equal to (==) False) and ((((Matching unit) is A structure) Equal to (==) False) and ((((Matching unit) is Mechanical) Equal to (==) False) and ((((Matching unit) is Magic Immune) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to TempGroup
-
Loop - Actions
- Trigger - Run Tsunami Knockback Init <gen> (ignoring conditions)
- Set Ts_Distance = (Ts_Distance offset by 175.00 towards (Angle from Ts_Distance to TempLoc2) degrees)
- Trigger - Run (This trigger) (checking conditions)
The initialization of the Knockback System
-
Tsunami Knockback Init
- Events
- Conditions
-
Actions
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
- Unit - Make (Picked unit) face TempLoc2 over 0.00 seconds
- Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (40.00 + (((Real((Level of Q for (Triggering unit)))) - 1.00) x 30.00)) damage of attack type Spells and damage type Lightning
- -------- call knockback --------
- Set KnockbackCall_Unit = (Picked unit)
- Set KnockbackCall_Dur = 1.20
- Set KnockbackCall_Dist = (Distance between (Position of (Picked unit)) and TempLoc)
- Set KnockbackCall_Angle = (Angle from (Position of (Picked unit)) to TempLoc)
- Set KnockbackCall_SFX = Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
- Set KnockbackCall_DestroyTree = False
- Trigger - Run Knockback Call <gen> (ignoring conditions)
- -------- --- done --- --------
- Custom script: call RemoveLocation( udg_TempLoc2 )
-
Loop - Actions
- Custom script: call RemoveLocation( udg_TempLoc )
- Unit Group - Remove (Target unit of ability being cast) from TempGroup
-
Unit Group - Pick every unit in TempGroup and do (Actions)
What could be the problem? If I issue my hero to cast the spell, it quits, but doesn't generate alarms/errors. I think something with the "Tsunami Add" trigger is the problem, but I don't have any idea.