• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Tsunami

Status
Not open for further replies.
Level 3
Joined
Jun 25, 2011
Messages
39
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
  • 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)

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
      • 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 )
      • Custom script: call RemoveLocation( udg_TempLoc )
      • Unit Group - Remove (Target unit of ability being cast) from TempGroup

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.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Try removing the condition in the your Add trigger because if we are to think: if the condition is not met then nothing will activate and most likely your ability activates on the Add trigger so if the condition there is not satisfied then it won't cast.

This is just a wild guess but do try out.

EDIT: Thanks for the clarification, Malhorne.
 
Last edited:
Status
Not open for further replies.
Top