• 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.

Warden Leap [GUI] v0.4

Description:

Leaps forward into battle, causing certain percentage of agility as damage when landing and returning to the starting point.

Customizable Things:
  1. Damage
  2. Damage Type
  3. Attack Type
  4. Area of Effect
  5. Range
  6. Range Incresed (Per Level)
  7. Special Effect (When Landing)
  8. Special Effect (When Flying)
  9. Special Effect (Tail)
  10. Animation
  11. Flying Height
  12. Flying Speed

Changelog

  1. v0.1 Released
  2. v0.2 Better Indexing; Fix minor leaks.
  3. v0.3 Code improvements.
  4. v0.4 Arc movement improved.
204181-albums4594-picture61911.gif



  • Leap Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ------------- ----------------- ------------- --------
      • -------- ------------- Set Effects ------------- --------
      • -------- ------------- ----------------- ------------- --------
      • -------- 1: Tail --------
      • Set Leap_Effect[1] = Abilities\Weapons\WaterElementalMissile\WaterElementalMissile.mdl
      • -------- 2: Tail Secondary --------
      • Set Leap_Effect[2] = Abilities\Weapons\SpiritOfVengeanceMissile\SpiritOfVengeanceMissile.mdl
      • -------- 3: Landing --------
      • Set Leap_Effect[3] = Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
      • -------- 4: Landing Secondary --------
      • Set Leap_Effect[4] = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • -------- ------------- -------------------- ------------- --------
      • -------- ------------- Set Damage ------------- --------
      • -------- ------------- -------------------- ------------- --------
      • Set Leap_Attack_Type = Spells
      • Set Leap_Damage_Type = Normal
      • -------- ------------- ----------------- ------------- --------
      • -------- ------------- Set Range ------------- --------
      • -------- ------------- ----------------- ------------- --------
      • -------- 1: Constant Range --------
      • Set Leap_Range_Base = 500.00
      • -------- 2: Increment Range --------
      • Set Leap_Range_Factor = 100.00
      • -------- ------------- ----------------- ------------- --------
      • -------- ------------- Set Speed ------------- --------
      • -------- ------------- ----------------- ------------- --------
      • -------- 1: Quantity Range of motion in every 0.02 seconds. --------
      • Set Leap_Speed = 25.00
      • -------- ------------- ---------------------- ------------- --------
      • -------- ------------- Set Animation ------------- --------
      • -------- 1: 6 refer to animation ID --------
      • Set Leap_Anim_Integer = 6
      • -------- 2: Animation Interval --------
      • Set Leap_Anim = 0.15
      • -------- ------------- ----------------- ------------- --------
      • -------- ------------- Set Height ------------- --------
      • -------- ------------- ----------------- ------------- --------
      • Set Leap_Height = 300.00
  • Leap Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Leap
    • Actions
      • Unit - Order (Triggering unit) to Stop
      • -------- ------------- ------------- ------------- --------
      • -------- ------------- Indexing ------------- --------
      • -------- ------------- ------------- ------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Leap_Index_Reached Equal to 0
        • Then - Actions
          • Trigger - Turn on Leap Loop <gen>
        • Else - Actions
      • Set Leap_Index_Reached = (Leap_Index_Reached + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Leap_Index_Reached Greater than Leap_Index_Max
        • Then - Actions
          • Set Leap_Index[Leap_Index_Reached] = Leap_Index_Reached
          • Set Leap_Index_Max = Leap_Index_Reached
        • Else - Actions
      • Set Leap_Index_Temp = Leap_Index[Leap_Index_Reached]
      • -------- ------------- ---------------- ------------- --------
      • Set Leap_Boolean[Leap_Index_Temp] = True
      • -------- ------------- ---------------- ------------- --------
      • -------- ------------- Set Caster ------------- --------
      • -------- ------------- ---------------- ------------- --------
      • Set Leap_Caster[Leap_Index_Temp] = (Triggering unit)
      • Custom script: if UnitAddAbility(udg_Leap_Caster[udg_Leap_Index_Temp],'Amrf') then
      • Custom script: call UnitRemoveAbility(udg_Leap_Caster[udg_Leap_Index_Temp],'Amrf')
      • Custom script: endif
      • Unit - Pause Leap_Caster[Leap_Index_Temp]
      • -------- ------------- ----------------- ------------- --------
      • -------- ------------- Set Effects ------------- --------
      • -------- ------------- ----------------- ------------- --------
      • Special Effect - Create a special effect attached to the origin of Leap_Caster[Leap_Index_Temp] using Leap_Effect[1]
      • Set Leap_Sfx[Leap_Index_Temp] = (Last created special effect)
      • -------- ------------- -------------------- ------------- --------
      • -------- ------------- Set Damage ------------- --------
      • -------- ------------- -------------------- ------------- --------
      • Set Leap_Damage[Leap_Index_Temp] = ((1.00 x (Real((Agility of Leap_Caster[Leap_Index_Temp] (Include bonuses))))) x (Real((Level of (Ability being cast) for Leap_Caster[Leap_Index_Temp]))))
      • Set Leap_Damage_AoE[Leap_Index_Temp] = 300.00
      • -------- ------------- ---------------------- ------------- --------
      • -------- ------------- Set Animation ------------- --------
      • Animation - Change Leap_Caster[Leap_Index_Temp]'s animation speed to 200.00% of its original speed
      • Set Leap_Anim_Reached[Leap_Index_Temp] = 0.00
      • -------- ------------- ----------------- ------------- --------
      • -------- ------------- Set Range ------------- --------
      • -------- ------------- ----------------- ------------- --------
      • -------- ------------- -------------------- ------------- --------
      • -------- Range_Base = Initial distance. --------
      • -------- ------------- -------------------- ------------- --------
      • -------- ------------- ------------------------------------------------------- ------------- --------
      • -------- Range_Factor = Additional distance per level of skill. --------
      • -------- ------------- ------------------------------------------------------- ------------- --------
      • Set Leap_Range[Leap_Index_Temp] = (Leap_Range_Base + (Leap_Range_Factor x (Real((Level of (Ability being cast) for Leap_Caster[Leap_Index_Temp])))))
      • Set Leap_Range_Reached[Leap_Index_Temp] = 0.00
      • Set Leap_Range_Half[Leap_Index_Temp] = (Leap_Range[Leap_Index_Temp] x 0.50)
      • -------- ------------- ----------------- ------------- --------
      • -------- ------------- Set Height ------------- --------
      • -------- ------------- ----------------- ------------- --------
      • Set Leap_Height_Reached[Leap_Index_Temp] = 0.00
  • Leap Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Leap_Loop) from 1 to Leap_Index_Reached, do (Actions)
        • Loop - Actions
          • Set Leap_Index_Temp = Leap_Index[Leap_Loop]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Leap_Boolean[Leap_Index_Temp] Equal to False) and (Leap_Range_Reached[Leap_Index_Temp] Equal to Leap_Range[Leap_Index_Temp])
            • Then - Actions
              • Animation - Change Leap_Caster[Leap_Index_Temp]'s animation speed to 100.00% of its original speed
              • Animation - Reset Leap_Caster[Leap_Index_Temp]'s animation
              • Special Effect - Destroy Leap_Sfx[Leap_Index_Temp]
              • Unit - Unpause Leap_Caster[Leap_Index_Temp]
              • Set Leap_Index[Leap_Loop] = Leap_Index[Leap_Index_Reached]
              • Set Leap_Index[Leap_Index_Reached] = Leap_Index_Temp
              • Set Leap_Index_Reached = (Leap_Index_Reached - 1)
              • Set Leap_Loop = (Leap_Loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Leap_Index_Reached Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Skip remaining actions
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Leap_Range_Reached[Leap_Index_Temp] Less than Leap_Range[Leap_Index_Temp]
                • Then - Actions
                  • Set Leap_Range_Reached[Leap_Index_Temp] = (Leap_Range_Reached[Leap_Index_Temp] + Leap_Speed)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Leap_Boolean[Leap_Index_Temp] Equal to True
                    • Then - Actions
                      • Set Leap_Angle = (Facing of Leap_Caster[Leap_Index_Temp])
                    • Else - Actions
                      • Set Leap_Angle = ((Facing of Leap_Caster[Leap_Index_Temp]) - 180.00)
                  • Set Leap_Caster_Loc = (Position of Leap_Caster[Leap_Index_Temp])
                  • Set Leap_Pos = (Leap_Caster_Loc offset by Leap_Speed towards Leap_Angle degrees)
                  • Set Leap_Loc = (Leap_Caster_Loc offset by Leap_Speed towards Leap_Angle degrees)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at Leap_Loc of type Flyability is off) Not equal to True
                    • Then - Actions
                      • Custom script: call SetUnitX(udg_Leap_Caster[udg_Leap_Index_Temp], GetLocationX(udg_Leap_Loc))
                      • Custom script: call SetUnitY(udg_Leap_Caster[udg_Leap_Index_Temp], GetLocationY(udg_Leap_Pos))
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Leap_Anim_Reached[Leap_Index_Temp] Less than Leap_Anim
                        • Then - Actions
                          • Set Leap_Anim_Reached[Leap_Index_Temp] = (Leap_Anim_Reached[Leap_Index_Temp] + 0.03)
                        • Else - Actions
                          • Set Leap_Anim_Reached[Leap_Index_Temp] = 0.00
                          • Custom script: call SetUnitAnimationByIndex(udg_Leap_Caster[udg_Leap_Index_Temp], udg_Leap_Anim_Integer)
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_Leap_Caster_Loc)
                  • Custom script: call RemoveLocation(udg_Leap_Loc)
                  • Custom script: call RemoveLocation(udg_Leap_Pos)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Leap_Range_Reached[Leap_Index_Temp] Less than or equal to Leap_Range_Half[Leap_Index_Temp]
                    • Then - Actions
                      • Set Leap_Height_Reached[Leap_Index_Temp] = (Leap_Height_Reached[Leap_Index_Temp] + Leap_Speed)
                    • Else - Actions
                      • Set Leap_Height_Reached[Leap_Index_Temp] = (Leap_Height_Reached[Leap_Index_Temp] - Leap_Speed)
                  • Animation - Change Leap_Caster[Leap_Index_Temp] flying height to (((4.00 x Leap_Height) / Leap_Range[Leap_Index_Temp]) x ((Leap_Range[Leap_Index_Temp] - Leap_Range_Reached[Leap_Index_Temp]) x (Leap_Range_Reached[Leap_Index_Temp] / Leap_Range[Leap_Index_Temp]))) at 0.00
                  • Special Effect - Create a special effect attached to the origin of Leap_Caster[Leap_Index_Temp] using Leap_Effect[2]
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • Set Leap_Caster_Loc = (Position of Leap_Caster[Leap_Index_Temp])
                  • Special Effect - Create a special effect at Leap_Caster_Loc using Leap_Effect[4]
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect at Leap_Caster_Loc using Leap_Effect[3]
                  • Special Effect - Destroy (Last created special effect)
                  • Set Leap_Range_Reached[Leap_Index_Temp] = 0.00
                  • Set Leap_Boolean[Leap_Index_Temp] = False
                  • Set Leap_Damage_Group = (Units within Leap_Damage_AoE[Leap_Index_Temp] of Leap_Caster_Loc)
                  • Unit Group - Pick every unit in Leap_Damage_Group and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) is A structure) Not equal to True
                          • ((Picked unit) is Magic Immune) Not equal to True
                          • ((Picked unit) is alive) Equal to True
                          • ((Picked unit) belongs to an enemy of (Owner of Leap_Caster[Leap_Index_Temp])) Equal to True
                        • Then - Actions
                          • Unit - Cause Leap_Caster[Leap_Index_Temp] to damage (Picked unit), dealing Leap_Damage[Leap_Index_Temp] damage of attack type Leap_Attack_Type and damage type Leap_Damage_Type
                          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Leap_Effect[3]
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                  • Custom script: call DestroyGroup(udg_Leap_Damage_Group)
                  • Custom script: call RemoveLocation(udg_Leap_Caster_Loc)


Keywords:
Leap, Savage, Roar, Agility, Coup, Grace, Jump, Round, Trip, Thunder, Wrath, Fury, Rage, Frog, Froggy, Insanity, Freenzy, Berserker, Lightning, Burn,
Contents

Warden Leap [GUI] v0.4 (Map)

Reviews
10:43, 14th Oct 2012 Magtheridon96: Approved. This is a nice spell with decent effects, good configuration and an efficient script. Well done.

Moderator

M

Moderator

10:43, 14th Oct 2012
Magtheridon96: Approved.
This is a nice spell with decent effects, good configuration and an efficient script.
Well done.
 
I have a cool suggestion for you to reduce the number of triggers.

When you change the period from 0.02 to 0.03, you can move the code inside your Leap Loop Anim trigger to the Leap Loop trigger, but you would have an integer called counter for the spell that would be incremented (increased by 1) inside the loop, and when (Counter Mod 5) equals 0, then set the animation of the caster.

This way, it will indeed only happen every 0.15 seconds :D

Also, you have several location/group leaks:

  • Set Leap_X = (X of ((Position of Leap_Caster[Leap_Integer[3]]) offset by Leap_Speed[Leap_Integer[3]] towards Leap_Angle degrees))
  • Set Leap_Y = (Y of ((Position of Leap_Caster[Leap_Integer[3]]) offset by Leap_Speed[Leap_Integer[3]] towards Leap_Angle degrees))
  • Set Leap_Loc = ((Position of Leap_Caster[Leap_Integer[3]]) offset by 15.00 towards Leap_Angle degrees)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Terrain pathing at Leap_Loc of type Flyability is off) Not equal to True
    • Then - Actions
      • Custom script: call SetUnitX(udg_Leap_Caster[udg_Leap_Integer[3]],udg_Leap_X)
      • Custom script: call SetUnitY(udg_Leap_Caster[udg_Leap_Integer[3]],udg_Leap_Y)
    • Else - Actions
  • Custom script: call RemoveLocation(udg_Leap_Loc)
How to fix this:

  • Set CasterLoc = (Position of Leap_Caster[Leap_Integer[3]])
  • Set Leap_pos = (CasterLoc offset by Leap_Speed[Leap_Integer[3]] towards Leap_Angle degrees)
  • Set Leap_Loc = (CasterLoc offset by 15.00 towards Leap_Angle degrees)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Terrain pathing at Leap_Loc of type Flyability is off) Not equal to True
    • Then - Actions
      • Custom script: call SetUnitX(udg_Leap_Caster[udg_Leap_Integer[3]], GetLocationX(udg_Leap_pos))
      • Custom script: call SetUnitY(udg_Leap_Caster[udg_Leap_Integer[3]], GetLocationY(udg_Leap_pos))
    • Else - Actions
  • Custom script: call RemoveLocation(udg_Leap_Loc)
  • Custom script: call RemoveLocation(udg_CasterLoc)
  • Custom script: call RemoveLocation(udg_Leap_pos)
There are other leaks as well, such as the Leap_Damage_Group that never gets destroyed and this line:
  • Set Leap_Loc = ((Position of Leap_Caster[Leap_Integer[3]]) offset by 15.00 towards Leap_Angle degrees)
In the last Else code block of your Loop trigger.

Other improvements:
- Instead of using a rate of 1000000000.00 for the flying height change, use 0, because that's instant. 1000000000.00 isn't totally instant.
- You should make the Thunder Clap special effect configurable. You should also make the water elemental projectile effect configurable.
- Instead of setting all the constant variables like the special effects, the damage type, the attack type and all the other constants in the casting trigger, you should do it on map initialization. You don't need to use an arrayed variable to lookup the special effect used for example, you can do it from a constant variable that only gets set once.

So, Leap_Speed, Leap_Height, Leap_Range_Base, Leap_Range_Factor, Leap_Anim_Integer, Leap_Sfx_2, Leap_Sfx_3, Leap_Damage_AoE, Leap_Damage_Type_1 and Leap_Damage_Type_2 should all be changed to normal variables (not arrays) and be set on map initialization.
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
  • Set Leap_Damage_Group = (Units within Leap_Damage_AoE[Leap_Index_Temp] of Leap_Caster_Loc)
  • Unit Group - Pick every unit in Leap_Damage_Group and do (Actions)
You can use set bj_wantDestroyGroup = true and put the Leap_Damage_Group inside the group block like this:
  • Custom Script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within Leap_Damage_AoE[Leap_Index_Temp] of Leap_Caster_Loc) and do (Actions)
Anyway pausing units is bad ^^.
Other than that nice effects and spell ^^.
 
Top