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
Heroic Leap v0.01.w3x
Variables
Initialization
Initialization
Restoring Health
Spell
Heroic Leap Cast
Heroic Leap Loop
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
Hashtable
hashtable
No
Leapers
group
No
Points
location
Yes
Real
real
Yes
Target
unit
No
Default melee game initialization for all players
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) the text: Don't worry about health, it will restore itself
Restoring Health
Events
Unit - Warrior 0005 <gen> 's life becomes Less than 500.00
Conditions
Actions
Special Effect - Create a special effect attached to the origin (Unexpected type: 'attachpoint') of (Triggering unit) using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit - Set life of (Triggering unit) to 100 %
Heroic Leap Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Heroic Leap
Actions
-------- Stores into variables Caster and Target --------
Set Variable Set Caster = (Triggering unit)
Set Variable Set Target = (Target unit of ability being cast)
-------- Finds the Distance between the Caster and Target --------
Set Variable Set Points[1] = (Position of Caster)
Set Variable Set Points[2] = (Position of Target)
Set Variable Set Real[1] = (Distance between Points[1] and Points[2])
-------- Counts up the range at which the Caster shall start landing --------
Set Variable Set Real[2] = (Real[1] / 2.00)
-------- Makes Caster invurnerable and turns it's Collision off --------
Unit - Make Caster Invulnerable
Unit - Turn collision for Caster Off .
-------- Creates a trail SFX and instantly destroys it, removing leak --------
Special Effect - Create a special effect attached to the chest (Unexpected type: 'attachpoint') of Caster using Abilities\Spells\Human\Invisibility\InvisibilityTarget.mdl
Special Effect - Destroy (Last created special effect)
-------- Stores target into Hashtable --------
Hashtable - Save Handle Of Target as 0 of (Key (Triggering unit).) in Hashtable .
-------- Stores the Distance-to-jump and distance at which the Caster shall start landing --------
Hashtable - Save Real[1] as 1 of (Key (Triggering unit).) in Hashtable .
Hashtable - Save Real[2] as 2 of (Key (Triggering unit).) in Hashtable .
-------- NOTE 1: All required information is attached to caster. That's why it was made Invulnerable --------
-------- Checks if there is any instance of spell already in effect --------
-------- If not, turns the Loop trigger on --------
If ((Leapers is empty) Equal to True) then do (Turn on Heroic_Leap_Loop <gen>) else do (Do nothing)
-------- Adds the Caster into Leapers' group --------
Unit Group - Add Caster to Leapers
-------- Removes leaks --------
Custom script: call RemoveLocation(udg_Points[1])
Custom script: call RemoveLocation(udg_Points[2])
Heroic Leap Loop
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in Leapers and do (Actions)
Loop - Actions
-------- Stores Target and Caster into variables --------
Set Variable Set Target = (Load 0 of (Key (Picked unit).) in Hashtable.)
Set Variable Set Caster = (Picked unit)
-------- Finds the locations of Caster and Target --------
Set Variable Set Points[1] = (Position of Caster)
Set Variable Set Points[2] = (Position of Target)
-------- Finds a location to which the Caster would be moved --------
-------- NOTE 1: Here change your speed --------
-------- NOTE 2: Speed is counted by dividing your real number into trigger's loop interval --------
-------- NOTE 3: My speed is 40/0.04=1000 units per second --------
Set Variable Set Points[3] = (Points[1] offset by 40.00 towards (Angle from Points[1] to Points[2]) degrees.)
-------- Loads the Distance at which caster would start landing --------
Set Variable Set Real[1] = (Load 2 of (Key (Picked unit).) from Hashtable.)
-------- Counts the Distance between caster and target --------
Set Variable Set Real[2] = (Distance between Points[1] and Points[2])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Real[2] Greater than or equal to 120.00
Then - Actions
-------- If distance between caster and target is greater than 120, then... --------
-------- Moves caster to Points[3] --------
Unit - Move Caster instantly to Points[3] , facing Points[2]
-------- Increases/decreases the flying heigh of Caster --------
-------- NOTE 4: Here it checks if the Distance between Caster and Target is greater than Distance at which Caster should start landing --------
-------- If yes, then it increases the flying height of the caster, else reduces it by equal amount --------
If (Real[2] Greater than or equal to Real[1]) then do (Set VariableSet Real[1] = "8.00") else do (Set VariableSet Real[1] = "-8.00")
Unit - Add Storm Crow Form to Caster
Unit - Remove Storm Crow Form from Caster
Animation - Change Caster flying height to ((Current flying height of Caster) + Real[1]) at 1000000000.00
Else - Actions
-------- Else... --------
-------- Resets the Flying height of Caster --------
Animation - Change Caster flying height to 0.00 at 100000000.00
-------- Makes it vurnerable again and turns it's collisiong on --------
Unit - Make Caster Vulnerable
Unit - Turn collision for Caster On .
-------- Orders caster to attack target --------
Unit - Order Caster to Attack . Target
-------- Creates the Thunderclap --------
-------- NOTE 5: Change damage at dummy ability in Object Editor --------
Unit - Create 1 . Dummy Unit for (Owner of Caster) at Points[1] facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Dummy Thunder Clap to (Last created unit)
Unit - Set level of Dummy Thunder Clap for (Last created unit) to (Level of Heroic Leap for Caster)
Unit - Order (Last created unit) to Human Mountain King - Thunder Clap .
-------- Clears the Hashtable and Removes caster from Leapers' group --------
Hashtable - Clear all child hashtables of child (Key (Picked unit).) in Hashtable .
Unit Group - Remove (Picked unit) from Leapers .
-------- Clears 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 left after loop --------
-------- If not, turns this trigger off --------
If ((Leapers 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.