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!
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
Triggers
Double Tide v0.04.w3x
Variables
Initialization
Initialization
Spell
Double Tide Cast
Double Tide Slide
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.
Name
Type
is_array
initial_value
Caster
unit
No
Casters
group
No
Enemies
group
No
Hashtable
hashtable
No
Integer
integer
No
Points
location
Yes
Real
real
Yes
Initialization
Events
Map initialization
Conditions
Actions
Visibility - Disable fog of war
Visibility - Disable black mask
Hashtable - Create a hashtable
Set Variable Set Hashtable = (Last created hashtable)
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 Variable Set Caster = (Triggering unit)
-------- Finds the Locations of the Caster --------
Set Variable Set Points[1] = (Position of Caster)
-------- Finds an available target point, which would be not out side the map --------
Set Variable 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 Variable 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 Variable Set Real[2] = "100.00"
-------- Saves the Angle in which generally waves will move --------
Set Variable Set Real[3] = (Angle from Points[1] to Points[2])
-------- Stores Damage to deal with waves --------
Set Variable 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 (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 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 Variable Set Real[1] = (Load 0 of (Key (Picked unit).) from Hashtable.)
Set Variable Set Real[1] = (Real[1] - 56.00)
-------- Loads the range of turning-point --------
Set Variable Set Real[2] = (Load 4 of (Key (Picked unit).) from Hashtable.)
-------- Loads the range at which the SFX will be played --------
Set Variable 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 VariableSet Real[3] = (Real[3] + 16.00)) else do (Set VariableSet Real[3] = (Real[3] - 16.00))
-------- Loads the angle to slide to --------
Set Variable Set Real[4] = (Load 2 of (Key (Picked unit).) from Hashtable.)
-------- Loads the damage to deal if waves collide any enemy --------
Set Variable Set Real[5] = (Load 3 of (Key (Picked unit).) from Hashtable.)
-------- Finds the location of the Caster --------
Set Variable 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 Variable Set Points[2] = (Points[1] offset by Real[3] towards (Real[4] - 90.00) degrees.)
Set Variable Set Points[3] = (Points[1] offset by Real[3] towards (Real[4] + 90.00) degrees.)
-------- Prepares the Integer variable for first wave --------
Set Variable 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 Variable Set Enemies = (Units within 100.00 of Points[Integer] matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) has buff Slow) Not equal to True)) and ((((Matching unit) is Mechanical) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) is dead) Not equal to True) and ((((Matching unit) is visible to (Owner of Caster).) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Caster).) Equal to True))))))).)
-------- 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 (Unexpected type: 'attachpoint') 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 Variable 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 Variable 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 (Move Caster instantly to Points[1]) else do (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 %, 100 %, 100 %) 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 (Turn off (This trigger)) else do (Do nothing)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.