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
Whirlwind v0.03.w3x
Variables
Initialization
Initialization
Restoration
Spell
Whirlwind Cast
Whirlwind 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
Enemies
group
No
Hashtable
hashtable
No
Points
location
Yes
Real
real
Yes
Whirlwinds
group
No
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)
Game - Display to (All players) for 0.00 seconds the text: Don't worry about health, it will restore itself.
Restoration
Events
Unit - Barbarian 0000 <gen> 's life becomes Less than 800.00
Conditions
Actions
Unit - Set life of (Triggering unit) to 100 %
Special Effect - Create a special effect attached to the overhead (Unexpected type: 'attachpoint') of (Triggering unit) using Abilities\Spells\Undead\ReplenishHealth\ReplenishHealthCasterOverhead.mdl
Special Effect - Destroy (Last created special effect)
Whirlwind Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Whirlwind
Actions
-------- Stores Caster into variable --------
Set Variable Set Caster = (Triggering unit)
-------- Finds caster's location and target point --------
Set Variable Set Points[1] = (Position of Caster)
Set Variable Set Points[2] = (Target point of ability being cast)
-------- Fixes out of map bugg --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain pathing at Points[2] of type Walkability is off) Equal to True
Then - Actions
Item - Create Tome of Experience at Points[2]
Custom script: call RemoveLocation(udg_Points[2])
Set Variable Set Points[2] = (Position of (Last created item))
Item - Remove (Last created item)
Else - Actions
-------- Counts speed of the Caster --------
-------- NOTE 1: Change your speed. That speed must be multiplied by Sliding trigger's loop interval --------
Set Variable Set Real[1] = ((240.00 + (40.00 x (Real((Level of Whirlwind for Caster))))) x 0.03)
-------- Counts distance-to-slide --------
Set Variable Set Real[2] = (Distance between Points[1] and Points[2])
-------- Counts angle between caster and target point --------
Set Variable Set Real[3] = (Angle from Points[1] to Points[2])
-------- Counts damage interval --------
-------- NOTE 2: Change your damage interval here. If the Interval is below 0.03, then it will cut once per 0.03 (Sliding trigger's interval) --------
Set Variable Set Real[4] = (2.00 - (0.03 x (Real((Agility of Caster (Include bonuses))))))
-------- Counts the coefficients of strength for damage and counts Min and Max damage --------
-------- NOTE 3: Count your damage here --------
Set Variable Set Real[5] = (0.75 + (0.50 x (Real((Level of Whirlwind for Caster)))))
Set Variable Set Real[6] = (1.25 + (0.50 x (Real((Level of Whirlwind for Caster)))))
Set Variable Set Real[5] = (Real[5] x (Real((Strength of Caster (Include bonuses)))))
Set Variable Set Real[6] = (Real[6] x (Real((Strength of Caster (Include bonuses)))))
-------- Pauses caster --------
Unit - Pause Caster
-------- Turns Caster's collision off --------
Unit - Turn collision for Caster Off .
-------- Stores all information into Hashtable --------
-------- NOTE 4: All information is attached to Caster, so be careful with coding your spells --------
Hashtable - Save Real[1] as 0 of (Key (Triggering unit).) in Hashtable .
Hashtable - Save Real[2] as 1 of (Key (Triggering unit).) in Hashtable .
Hashtable - Save Real[3] as 2 of (Key (Triggering unit).) in Hashtable .
Hashtable - Save Real[4] as 3 of (Key (Triggering unit).) in Hashtable .
Hashtable - Save Real[5] as 4 of (Key (Triggering unit).) in Hashtable .
Hashtable - Save Real[6] as 5 of (Key (Triggering unit).) in Hashtable .
Hashtable - Save Real[4] as 7 of (Key (Triggering unit).) in Hashtable .
-------- Checks if there is any instance of spell already running ingame --------
-------- If not, turns sliding trigger on --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Whirlwinds is empty) Equal to True
Then - Actions
Trigger - Turn on Whirlwind_Slide <gen>
Else - Actions
-------- Adds caster to Casters' group --------
Unit Group - Add (Triggering unit) to Whirlwinds
-------- Fixes the leaks --------
Custom script: call RemoveLocation(udg_Points[1])
Custom script: call RemoveLocation(udg_Points[2])
Whirlwind Slide
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in Whirlwinds and do (Actions)
Loop - Actions
-------- Stores caster into variable, purely for faster code writing --------
Set Variable Set Caster = (Picked unit)
-------- Checks if Caster is dead --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Caster is alive) Equal to True
Then - Actions
-------- If it Isn't, then... --------
-------- Loads speed of Caster --------
Set Variable Set Real[1] = (Load 0 of (Key (Picked unit).) from Hashtable.)
-------- Loads distance-to-slide and reduces it by speed --------
Set Variable Set Real[2] = (Load 1 of (Key (Picked unit).) from Hashtable.)
Set Variable Set Real[2] = (Real[2] - Real[1])
-------- Loads angle towards which the Caster will fly --------
Set Variable Set Real[3] = (Load 2 of (Key (Picked unit).) from Hashtable.)
-------- Finds caster's location and counts point to which caster would be moved --------
Set Variable Set Points[1] = (Position of Caster)
Set Variable Set Points[2] = (Points[1] offset by Real[1] towards Real[3] degrees.)
-------- Loads timer of damaging and reduces it by 0.03 (trigger's loop interval) --------
Set Variable Set Real[4] = (Load 3 of (Key (Picked unit).) from Hashtable.)
Set Variable Set Real[4] = (Real[4] - 0.03)
-------- Checks if it is time to do the damage --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Real[4] Less than or equal to 0.00
Then - Actions
-------- If it is, then... --------
-------- Enumerates possible targets --------
-------- NOTE 2: Enumerates all live enemy units that are not ethereal --------
Set Variable Set Enemies = (Units within 280.00 of Points[2] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Ethereal) Not equal to True) and ((((Matching unit) is dead) Not equal to True) and (((Matching unit) belongs to an enemy of (Owner of Caster).) Equal to True)))).)
-------- Loads Min and Max damage --------
Set Variable Set Real[5] = (Load 4 of (Key (Picked unit).) from Hashtable.)
Set Variable Set Real[6] = (Load 5 of (Key (Picked unit).) from Hashtable.)
-------- Does the damaging --------
Unit Group - Pick every unit in Enemies and do (Actions)
Loop - Actions
Unit - Cause Caster to damage (Picked unit) , dealing (Random real number between Real[5] and Real[6]) 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\Stampede\StampedeMissileDeath.mdl
Special Effect - Destroy (Last created special effect)
-------- Fixes the leak --------
Custom script: call DestroyGroup(udg_Enemies)
-------- Resets timer --------
Set Variable Set Real[4] = (Load 7 of (Key (Picked unit).) from Hashtable.)
Else - Actions
-------- Updates timer for next damage tick --------
Hashtable - Save Real[4] as 3 of (Key (Picked unit).) in Hashtable .
-------- Moves the Caster --------
Unit - Move Caster instantly to Points[2]
-------- Plays Caster's spin animation --------
-------- NOTE 3: Only models which have Attack Walk Spin thing animation will actually spin --------
-------- Only 4 original Warcraft III models have this animation --------
Animation - Play Caster 's spin animation
-------- Destroys trees --------
Destructible - Pick every destructible within 128.00 of Points[2] and do (Kill (Picked destructible))
-------- Checks if it isn't time for caster to stop --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Real[2] Less than or equal to 0.00
Then - Actions
-------- If it is, then... --------
-------- Unpauses the Caster --------
Unit - Unpause Caster
-------- Turns Caster's collision on --------
Unit - Turn collision for Caster On .
-------- Resets Caster's animation --------
Animation - Reset Caster 's animation
-------- Clears the Hashtable --------
Hashtable - Clear all child hashtables of child (Key (Picked unit).) in Hashtable .
-------- Removes Caster from Casters' group --------
Unit Group - Remove (Picked unit) from Whirlwinds .
Else - Actions
-------- If it isn't then updates distance-to-slide left --------
Hashtable - Save Real[2] as 1 of (Key (Picked unit).) in Hashtable .
-------- Fixes the leaks --------
Custom script: call RemoveLocation(udg_Points[1])
Custom script: call RemoveLocation(udg_Points[2])
Else - Actions
-------- If it is, then... --------
-------- Unpauses the Caster --------
Unit - Unpause Caster
-------- Turns Caster's collision on --------
Unit - Turn collision for Caster On .
-------- Resets Caster's animation --------
Animation - Reset Caster 's animation
-------- Clears the Hashtable --------
Hashtable - Clear all child hashtables of child (Key (Picked unit).) in Hashtable .
-------- Removes Caster from Casters' group --------
Unit Group - Remove (Picked unit) from Whirlwinds .
-------- Checks if there is any insance of spell left ingame after loop --------
-------- If not, turns this trigger off --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
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.