1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  5. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  6. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  7. The results are out! Check them out.
    Dismiss Notice
  8. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  9. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Warden Leap [GUI] v0.4

Submitted by Marcos DAB
This bundle is marked as approved. It works and satisfies the submission rules.
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.


[​IMG]

Triggers

  • 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
Moderator
10:43, 14th Oct 2012 Magtheridon96: Approved. This is a nice spell with decent effects, good configuration and an efficient script. Well done.
  1. 10:43, 14th Oct 2012
    Magtheridon96: Approved.
    This is a nice spell with decent effects, good configuration and an efficient script.
    Well done.
     
  2. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,856
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Increase the loop by 0.03,this spell seems fine to me.
    Also i forgot,put a configuration trigger
    your arc sucks too.
    Use this:
    (((4xHeightBase)/MaxDistance)x((MaxDistance-Travelled)x(Travelled/Distance)))
    In this case,the arc will be smooth
     
    Last edited: Oct 14, 2012
  3. sonofjay

    sonofjay

    Joined:
    Oct 28, 2011
    Messages:
    4,240
    Resources:
    20
    Packs:
    1
    Maps:
    13
    Template:
    5
    Tutorials:
    1
    Resources:
    20
    Simple but really creative spell.(I really hate those leap spell that just literally make your hero leap.) Good job.
     
  4. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,006
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    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:

    Example
    • 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:

    Code
    • 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:
    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.
     
  5. Marcos DAB

    Marcos DAB

    Joined:
    Mar 26, 2011
    Messages:
    1,041
    Resources:
    218
    Models:
    1
    Icons:
    214
    Spells:
    2
    Tutorials:
    1
    Resources:
    218
    I'm working on it now.

    I don't want an arc purposely.

    Edit: Updated <> 17:28, 14th Oct 2012
     
    Last edited: Oct 14, 2012
  6. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,006
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    Hey, did you change the thumbnail to an in-game screenshot? Because I really don't want to clear my cache in order to find out :L
     
  7. Marcos DAB

    Marcos DAB

    Joined:
    Mar 26, 2011
    Messages:
    1,041
    Resources:
    218
    Models:
    1
    Icons:
    214
    Spells:
    2
    Tutorials:
    1
    Resources:
    218
    Thi is already done in v0.3.
    Press F5.

    Edit: Last version released (v0.4) <> 11:48, 15th Oct 2012
     
    Last edited: Oct 15, 2012
  8. Mapcreator_BL

    Mapcreator_BL

    Joined:
    Oct 12, 2012
    Messages:
    15
    Resources:
    0
    Resources:
    0
    WOW cool... thanks man! nice job
     
  9. jakeZinc

    jakeZinc

    Joined:
    Aug 13, 2013
    Messages:
    1,373
    Resources:
    20
    Spells:
    20
    Resources:
    20
    • 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 ^^.