• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Double Tide v0.04

A spell, which idea was with me for very long time.

Moves the Water King towards the target point in two arcing waves.
Hits only once, so double damage cannot be dealt.

If you use it in your map, give me credits.


  • Double Tide Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Double Tide
    • Actions
      • -------- Stores Caster into Variable --------
      • Set Caster = (Triggering unit)
      • -------- Finds the Locations of the Caster --------
      • Set Points[1] = (Position of Caster)
      • -------- Finds an available target point, which would be not out side the map --------
      • Set Points[2] = (Target point of ability being cast)
      • -------- Stores the Range between Caster's location and target point --------
      • -------- Note 1: You will move to the position of last created item to avoid the pathing problem --------
      • Set Real[1] = (Distance between Points[1] and Points[2])
      • -------- Saves the range of the arcing wave into variable --------
      • -------- Note 2: It will be used in Slide trigger, boosting or increasing it to make an Arcing wave --------
      • Set Real[2] = 100.00
      • -------- Saves the Angle in which generally waves will move --------
      • Set Real[3] = (Angle from Points[1] to Points[2])
      • -------- Stores Damage to deal with waves --------
      • Set Real[4] = (100.00 + (50.00 x (Real((Level of Double Tide for Caster)))))
      • -------- 'Hides' the Caster to make an illiusion it has splitted --------
      • Animation - Change Caster's vertex coloring to (0.00%, 0.00%, 0.00%) with 100.00% transparency
      • Animation - Change Caster's size to (1.00%, 1.00%, 1.00%) of its original size
      • -------- Turns collision off for Caster --------
      • Unit - Turn collision for Caster Off
      • -------- Stores the range to slide --------
      • Hashtable - Save Real[1] as 0 of (Key (Triggering unit)) in Hashtable
      • -------- Stores the Arcing range --------
      • Hashtable - Save Real[2] as 1 of (Key (Triggering unit)) in Hashtable
      • -------- Stores the Angle to slide to --------
      • Hashtable - Save Real[3] as 2 of (Key (Triggering unit)) in Hashtable
      • -------- Stores damage to deal --------
      • Hashtable - Save Real[4] as 3 of (Key (Triggering unit)) in Hashtable
      • -------- Stores the range at which waves would start going towards each other --------
      • Hashtable - Save (Real[1] / 2.00) as 4 of (Key (Triggering unit)) in Hashtable
      • -------- Note 3: Notice that all the information was attached to the Caster --------
      • -------- Checks if there is any instance of spell already in effect --------
      • -------- If not, turns the sliding trigger on --------
      • If ((Casters is empty) Equal to True) then do (Trigger - Turn on Double Tide Slide <gen>) else do (Do nothing)
      • -------- Adds the Caster into the Casters' group --------
      • Unit Group - Add Caster to Casters
      • -------- Clears the leaks --------
      • Custom script: call RemoveLocation(udg_Points[1])
      • Custom script: call RemoveLocation(udg_Points[2])
  • Double Tide Slide
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Casters and do (Actions)
        • Loop - Actions
          • -------- Stores the Caster into a variable --------
          • Set Caster = (Picked unit)
          • -------- Loads the range to slide and reduces it by Speed --------
          • -------- Note 1: this reducement number has to be equal with the one in the setting Points[4] in the If/then/else part --------
          • Set Real[1] = (Load 0 of (Key (Picked unit)) from Hashtable)
          • Set Real[1] = (Real[1] - 56.00)
          • -------- Loads the range of turning-point --------
          • Set Real[2] = (Load 4 of (Key (Picked unit)) from Hashtable)
          • -------- Loads the range at which the SFX will be played --------
          • Set Real[3] = (Load 1 of (Key (Picked unit)) from Hashtable)
          • -------- If range-to-slide left is greater than the one of the turning-point, then increases the the Arcing range --------
          • -------- Else reduces it by equal amount --------
          • If (Real[1] Greater than or equal to Real[2]) then do (Set Real[3] = (Real[3] + 16.00)) else do (Set Real[3] = (Real[3] - 16.00))
          • -------- Loads the angle to slide to --------
          • Set Real[4] = (Load 2 of (Key (Picked unit)) from Hashtable)
          • -------- Loads the damage to deal if waves collide any enemy --------
          • Set Real[5] = (Load 3 of (Key (Picked unit)) from Hashtable)
          • -------- Finds the location of the Caster --------
          • Set Points[1] = (Position of Caster)
          • -------- Counts up the locations at which the SFX will be played and which will be the center of enemies checking --------
          • Set Points[2] = (Points[1] offset by Real[3] towards (Real[4] - 90.00) degrees)
          • Set Points[3] = (Points[1] offset by Real[3] towards (Real[4] + 90.00) degrees)
          • -------- Prepares the Integer variable for first wave --------
          • Set Integer = 2
          • For each (Integer A) from 1 to 2, do (Actions)
            • Loop - Actions
              • -------- Plays the SFX and instantly destroys it --------
              • Special Effect - Create a special effect at Points[Integer] using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
              • Special Effect - Destroy (Last created special effect)
              • -------- Finds all enemies which would be 'colliding' the wave (of Points[Integer]) --------
              • -------- Note 2: it enumerates all enemy ground units, which are not structures, nor mechanicals, neither magic immune, which are alive and visible to the caster --------
              • -------- Note 3: Doesn't enumerate ones who already have the Slow buff --------
              • Set Enemies = (Units within 100.00 of Points[Integer] matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) has buff Double Tide ) Not equal to True)) and ((((Matching unit) is Mechanical) Not equal to True) and ((((Matching unit) is Magic I
              • -------- Does the slowing and damaging --------
              • Unit Group - Pick every unit in Enemies and do (Actions)
                • Loop - Actions
                  • Unit - Create 1 Dummy Unit for (Owner of Caster) at Points[2] facing Default building facing degrees
                  • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                  • Unit - Add Dummy Slow to (Last created unit)
                  • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
                  • Unit - Cause Caster to damage (Picked unit), dealing Real[5] damage of attack type Spells and damage type Normal
                  • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
                  • Special Effect - Destroy (Last created special effect)
              • -------- Destroys the Enemies' group --------
              • Custom script: call DestroyGroup(udg_Enemies)
              • -------- Increases the Integer for Next wave --------
              • Set Integer = (Integer + 1)
          • -------- The If/Then/Else part --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Real[1] Greater than or equal to 0.00
            • Then - Actions
              • -------- If the range-to-slide is not 0 or less, then... --------
              • -------- Finds the Location to which the Caster will be moved --------
              • Set Points[4] = (Points[1] offset by 56.00 towards Real[4] degrees)
              • -------- Moves Caster into Points[4], if that point is walkable --------
              • If ((Terrain pathing at Points[4] of type Walkability is off) Equal to True) then do (Unit - Move Caster instantly to Points[1]) else do (Unit - Move Caster instantly to Points[4])
              • -------- Updates the range-to-slide left and the Arcing range --------
              • Hashtable - Save Real[1] as 0 of (Key (Picked unit)) in Hashtable
              • Hashtable - Save Real[3] as 1 of (Key (Picked unit)) in Hashtable
              • -------- Clears the leak of last created point --------
              • Custom script: call RemoveLocation(udg_Points[4])
            • Else - Actions
              • -------- Clears the Hashtable --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hashtable
              • -------- 'Unhides' the Caster --------
              • Animation - Change Caster's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
              • Animation - Change Caster's size to (100.00%, 100.00%, 100.00%) of its original size
              • -------- Turns collision on for Caster --------
              • Unit - Turn collision for Caster On
              • -------- Removes the Caster from the Casters' group --------
              • Unit Group - Remove (Picked unit) from Casters
          • -------- Clears the leaks --------
          • Custom script: call RemoveLocation(udg_Points[1])
          • Custom script: call RemoveLocation(udg_Points[2])
          • Custom script: call RemoveLocation(udg_Points[3])
      • -------- Checks if there is any instance of spell in effect after loop --------
      • -------- If not, turns this trigger of --------
      • If ((Casters is empty) Equal to True) then do (Trigger - Turn off (This trigger)) else do (Do nothing)


v0.01 - First realesed
v0.02 - Fixed the Collision bugg
v0.03 - Shortened the Slide trigger, caster goes off the map no more
v0.04 - Remade the Out-Of-Map detection, now it doesn't move forward and returns to the map


Keywords:
Double, Tide, Water, Waves, Arc, Two
Contents

Double Tide v0.04 (Map)

Reviews
11:48, 17th Jun 2010 Hanky: You could check in the motion if your caster is still inside the map boundarys. Apart from that little thing everything looks fine enough.

Moderator

M

Moderator

11:48, 17th Jun 2010
Hanky:
You could check in the motion if your caster is still inside the map boundarys. Apart from that little thing everything looks fine enough.
 
Level 11
Joined
Jan 25, 2009
Messages
572
Instead of doing the damage and SFX twice, you can have an Loop integer action from 2 to 3 and then do Create a special effect at (Points[LoopInteger]) That's more flexible because then it's just starting over and the trigger will be really shorter wich means that more people can understand it better.
 
Level 2
Joined
Apr 10, 2010
Messages
22
nice spell, indeed:thumbs_up:

with a funny bug:
you are able to move out of the map.....

in your if/then/else structure which turns on the slide trigger add:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • 'IF'-Bedingungen
      • (Casters is empty) Gleich True
      • (Terrain pathing at Points[2] of type Begehbarkeit is off) Gleich True
    • 'THEN'-Aktionen
      • Auslöser - Turn on Double Tide Slide <gen>
    • 'ELSE'-Aktionen
only suggestion....hoping that I'm not rude......
 

Attachments

  • bug.jpg
    bug.jpg
    283.1 KB · Views: 229
Last edited:
Level 2
Joined
Apr 10, 2010
Messages
22
ohhhh....sorry.....how stupid ......:ugly::eekani:

i'm very, very sorry...i forgot that my WE is german
(and me, too)


sorry

I supposed that you could add a condition somewhere in the loop, which checks if the terrain at the targeted point is walkable or not and if it's not, you stop the trigger.



again sorry for it :pmeh:
 
Last edited:
Level 18
Joined
Jan 21, 2006
Messages
2,552
terrain at the targeted point is walkable or not and if it's not, you stop the trigger....

Or you could use Blink as your base ability and have it detect available pathing for you. I do this in one of my very old spell request threads, though this is much more complicated in GUI than it is in JASS. It's never a good idea to completely halt a spell though, that hinders its effectiveness in-game if you're constantly clicking inaccurately.

You could try creating an item at the target of the spell and then immediately removing it, using whatever it's coordinates are as the target coordinates of the spell. This may fail in large unpathable areas though, as the item will still be created despite the area being unpathable (or maybe it won't, I forget).

but since i guess you are much better in triggering than me you know how to fix it

You sound too sure of that.
 
Top