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

Pounce v1.0.0.1

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
[TD] Pounce [/TD]


Description:

Levels


Surges directly forward and latches on to the first hero he hits.
(w/o LEASH)
(I'm still working on it)
Level 1 - 40 Damage.
Level 2 - 80 Damage.
Level 3 - 120 Damage.
Level 4 - 160 Damage.
v1.0.0.0 - Initial Release
v1.0.0.1 - Well Fixed
[TD] Change Logs [/TD] [TD][/TD]

Spell Init

Pounce Cast

Pounce Loop

  • Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ################################################ --------
      • -------- ##################CONFIGURATION################## --------
      • -------- ################################################ --------
      • Set Pounce_SFX = Abilities\Weapons\AvengerMissile\AvengerMissile.mdl
      • Set Pounce_AoE_Pick = 100.00
      • Set Pounce_Damage[1] = 40.00
      • Set Pounce_Damage[2] = 80.00
      • Set Pounce_Damage[3] = 120.00
      • Set Pounce_Damage[4] = 160.00
      • Set Pounce_Animation = spell three
      • Set Pounce_Attachment[1] = right hand
      • Set Pounce_Attachment[2] = left hand
      • Set Pounce_Speed = 40.00
      • Set Pounce_MaxHeight = 300.00
      • Set Pounce_MaxDistance = 300.00
      • Set Pounce_FlyingRate = 400.00
      • Set Pounce_Interval = 0.03
      • Trigger - Add to Pounce Loop <gen> the event (Time - Every Pounce_Interval seconds of game time)
      • -------- -------------------------------------------------------------------- --------
      • -------- -------------------------------------------------------------------- --------
  • Pounce Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Pounce
    • Actions
      • -------- IMPORTANT SYSTEM PART START --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Pounce_IndexSize Equal to 0
        • Then - Actions
          • Trigger - Turn on Pounce Loop <gen>
        • Else - Actions
      • -------- Increase the index size --------
      • Set Pounce_IndexSize = (Pounce_IndexSize + 1)
      • -------- Dynamic Index --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Pounce_IndexSize Greater than Pounce_IndexMaxSize
        • Then - Actions
          • Set Pounce_Index[Pounce_IndexSize] = Pounce_IndexSize
          • Set Pounce_IndexMaxSize = Pounce_IndexSize
        • Else - Actions
      • -------- Dynamic Index End --------
      • -------- IMPORTANT SYSTEM PART END --------
      • Set Pounce_TempInt = Pounce_Index[Pounce_IndexSize]
      • -------- Setup those arrays --------
      • Set Pounce_CasterLoc = (Position of (Triggering unit))
      • Set Pounce_Caster[Pounce_TempInt] = (Triggering unit)
      • Set Pounce_Owner[Pounce_TempInt] = (Triggering player)
      • Set Pounce_Level[Pounce_TempInt] = (Level of Pounce for Pounce_Caster[Pounce_TempInt])
      • Set Pounce_Angle[Pounce_TempInt] = (Facing of (Triggering unit))
      • -------- ---------------------------------- --------
      • -------- Don't put the Distance variable to the Config Trigger --------
      • -------- or else the caster will not move --------
      • -------- SORRY ABOUT THAT MAGTHERIDON96 ^^ --------
      • -------- ---------------------------------- --------
      • Set Pounce_Distance = 50.00
      • -------- ---------------------------------- --------
      • -------- Creating Special Effects --------
      • -------- ---------------------------------- --------
      • Special Effect - Create a special effect attached to the Pounce_Attachment[1] of Pounce_Caster[Pounce_TempInt] using Pounce_SFX
      • Set Pounce_Buff1[Pounce_TempInt] = (Last created special effect)
      • Special Effect - Create a special effect attached to the Pounce_Attachment[2] of Pounce_Caster[Pounce_TempInt] using Pounce_SFX
      • Set Pounce_Buff2[Pounce_TempInt] = (Last created special effect)
      • -------- ---------------------------------- --------
      • -------- Clearing Leaks --------
      • -------- ---------------------------------- --------
      • Custom script: call RemoveLocation(udg_Pounce_CasterLoc)
  • Pounce Loop
    • Events
    • Conditions
    • Actions
      • -------- ------------------------------------------------------------------------------------------------ --------
      • -------- PLEASE READ================================== --------
      • -------- NOTE: I didn't put Lightning Effects coz' I don't have time. Maybe I'll Update It sooner. --------
      • -------- PLEASE READ================================== --------
      • -------- ------------------------------------------------------------------------------------------------ --------
      • For each (Integer Pounce_Loop) from 1 to Pounce_IndexSize, do (Actions)
        • Loop - Actions
          • -------- This let look everything cleaner. --------
          • Set Pounce_TempInt = Pounce_Index[Pounce_Loop]
          • -------- ------------------------------------------------------------------------------------------------ --------
          • -------- Don't Change the Real Number --------
          • -------- ------------------------------------------------------------------------------------------------ --------
          • -------- Condition... --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Pounce_Distance Greater than 0.00
            • Then - Actions
              • -------- ------------------------------------------------------------------------------------------------ --------
              • -------- NOTE: Don't Change Something Below This Line --------
              • -------- ------------------------------------------------------------------------------------------------ --------
              • Set Pounce_CasterLoc = (Position of Pounce_Caster[Pounce_TempInt])
              • Set Pounce_Height = (((4.00 x Pounce_MaxHeight) / Pounce_MaxDistance) x ((Pounce_MaxDistance - Pounce_Distance) x (Pounce_Distance / Pounce_MaxDistance)))
              • -------- ------------------------------------------------------------------------------------------------ --------
              • -------- This Script below, will make the Caster Fly --------
              • -------- and This will be the --- Add Crow Form, Remove Crow Form --- --------
              • -------- Don't Change Something Below This Line --------
              • -------- ------------------------------------------------------------------------------------------------ --------
              • Custom script: if UnitAddAbility(udg_Pounce_Caster[udg_Pounce_TempInt], 'Amrf') and UnitRemoveAbility(udg_Pounce_Caster[udg_Pounce_TempInt], 'Amrf') then
              • Custom script: endif
              • -------- ------------------------------------------------------------------------------------------------ --------
              • -------- Changes the Flying Height of the Caster --------
              • -------- ------------------------------------------------------------------------------------------------ --------
              • Animation - Change Pounce_Caster[Pounce_TempInt] flying height to Pounce_Height at Pounce_FlyingRate
              • -------- ------------------------------------------------------------------------------------------------ --------
              • -------- Moving the Caster --------
              • -------- ------------------------------------------------------------------------------------------------ --------
              • Custom script: call SetUnitX(udg_Pounce_Caster[udg_Pounce_TempInt],GetUnitX(udg_Pounce_Caster[udg_Pounce_TempInt]) + udg_Pounce_Speed * Cos(udg_Pounce_Angle[udg_Pounce_TempInt] * bj_DEGTORAD))
              • Custom script: call SetUnitY(udg_Pounce_Caster[udg_Pounce_TempInt],GetUnitY(udg_Pounce_Caster[udg_Pounce_TempInt]) + udg_Pounce_Speed * Sin(udg_Pounce_Angle[udg_Pounce_TempInt] * bj_DEGTORAD))
              • Animation - Play Pounce_Caster[Pounce_TempInt]'s Pounce_Animation animation
              • -------- ------------------------------------------------------------------------------------------------ --------
              • -------- ------------------------------------------------------------------------------------------------ --------
              • -------- ------------------------------------------------------------------------------------------------ --------
              • Set Pounce_Group = (Units within Pounce_AoE_Pick of Pounce_CasterLoc)
              • Custom script: set udg_Pounce_TempUnit = FirstOfGroup(udg_Pounce_Group)
              • Unit Group - Pick every unit in Pounce_Group and do (Actions)
                • Loop - Actions
                  • Set Pounce_Target[Pounce_TempInt] = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • (Owner of Pounce_Target[Pounce_TempInt]) Not equal to Pounce_Owner[Pounce_TempInt]
                          • (Pounce_Target[Pounce_TempInt] is alive) Equal to True
                    • Then - Actions
                      • Set Pounce_TargetLoc = (Position of Pounce_Target[Pounce_TempInt])
                      • Unit - Cause Pounce_Caster[Pounce_TempInt] to damage Pounce_Target[Pounce_TempInt], dealing Pounce_Damage[Pounce_Level[Pounce_TempInt]] damage of attack type Spells and damage type Normal
                      • -------- ---------------------------------- --------
                      • -------- When the caster encounters an enemy --------
                      • -------- the loop will stop. --------
                      • -------- ---------------------------------- --------
                      • Set Pounce_Distance = 0.00
                    • Else - Actions
              • -------- ---------------------------------- --------
              • -------- NOTE: Always set this to 0.80 below --------
              • -------- or else the loop will end fast --------
              • -------- ---------------------------------- --------
              • Set Pounce_Distance = (Pounce_Distance - 1.25)
              • -------- ---------------------------------- --------
              • -------- Clearing Leaks Again --------
              • -------- ---------------------------------- --------
              • Custom script: call DestroyGroup(udg_Pounce_Group)
              • Custom script: call RemoveLocation(udg_Pounce_CasterLoc)
            • Else - Actions
              • -------- ------------------------------------------------------------------------------------------------ --------
              • -------- Just making Sure --------
              • -------- ------------------------------------------------------------------------------------------------ --------
              • Animation - Change Pounce_Caster[Pounce_TempInt] flying height to 0.00 at 0.00
              • -------- ------------------------------------------------------------------------------------------------ --------
              • -------- Destroy Special Effects --------
              • -------- ------------------------------------------------------------------------------------------------ --------
              • Special Effect - Destroy Pounce_Buff1[Pounce_TempInt]
              • Special Effect - Destroy Pounce_Buff2[Pounce_TempInt]
              • -------- ------------------------------------------------------------------------------------------------ --------
              • -------- Resetting all Handles --------
              • -------- ------------------------------------------------------------------------------------------------ --------
              • Animation - Reset Pounce_Caster[Pounce_TempInt]'s animation
              • -------- ------------------------------------------------------------------------------------------------ --------
              • -------- Recycling Index --------
              • -------- NOTE: "AGAIN" Don't Change Something Below This Line" --------
              • -------- ------------------------------------------------------------------------------------------------ --------
              • Set Pounce_Height = 0.00
              • Set Pounce_Index[Pounce_Loop] = Pounce_Index[Pounce_IndexSize]
              • Set Pounce_Index[Pounce_IndexSize] = Pounce_TempInt
              • Set Pounce_IndexSize = (Pounce_IndexSize - 1)
              • Set Pounce_Loop = (Pounce_Loop - 1)
              • -------- ------------------------------------------------------------------------------------------------ --------
              • -------- Very Important Part will Start here --------
              • -------- ------------------------------------------------------------------------------------------------ --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Pounce_IndexSize Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Skip remaining actions
                • Else - Actions
              • -------- IMPORTANT SYSTEM PART END --------
[TD]SAMPLE IMAGES[/TD]

Image 1"

Image 2"

Image 3"

Pounce1.png
Pounce2.png
Pounce3.png


Keywords:
Pounce, No Leash, Slark, Nightcrawler, Murloc, DotA.
Contents

Just another Warcraft III map (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 11:22, 27th Oct 2012 Magtheridon96: - The spell is not totally MUI as you're using a static variable for the distance. (Same distance variable is shared by all spell instances) - The...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

11:22, 27th Oct 2012
Magtheridon96:

- The spell is not totally MUI as you're using a static variable for the distance. (Same distance variable is shared by all spell instances)
- The distance should be configurable.
- You're leaking Pounce_TargetLoc in the Loop trigger.
-
  • Set Pounce_Group = (Units within Pounce_AoE_Pick of Pounce_CasterLoc)
  • Custom script: set udg_Pounce_TempUnit = FirstOfGroup(udg_Pounce_Group)
  • Unit Group - Pick every unit in Pounce_Group and do (Actions)
    • Set Pounce_Target[Pounce_TempInt] = (Picked unit)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • And - All (Conditions) are true
          • (Owner of Pounce_Target[Pounce_TempInt]) Not equal to Pounce_Owner[Pounce_TempInt]
          • (Pounce_Target[Pounce_TempInt] is alive) Equal to true
      • Then - Actions
        • Set Pounce_TargetLoc = (Position of Pounce_Target[Pounce_TempInt])
        • Unit - Cause Pounce_Caster[Pounce_TempInt] to damage Pounce_Target[Pounce_TempInt] dealing Pounce_Damage[Pounce_Level[Pounce_TempInt]] damage of attack type Spells and damage type Normal
        • -------- ---------------------------------- --------
        • -------- When the caster encounters an enemy --------
        • -------- the loop will stop. --------
        • -------- ---------------------------------- --------
        • Set Pounce_Distance = 0.00
      • Else - Actions
This snippet of code makes no sense at all.
Are you trying to do the actions for one unit, or for all?
If you want to do them for all units, remove the custom script in which you set a unit to "FirstOfGroup(...)".
If you want to do the actions for a random unit from the group, remove the "Pick every unit in ..." line, and just do the actions of the group enumeration while using Pounce_TempUnit as your "random unit in the group".
 
  • Set Pounce_Group = (Units within Pounce_AoE_Pick of Pounce_CasterLoc matching (((Owner of (Matching unit)) Not equal to Pounce_Owner[Pounce_TempInt]) and (((Matching unit) is alive) Equal to True)))
You could put that inside a bigger unit group and use an IF block to make it more readable and more configurable

  • Set Pounce_Speed[Pounce_TempInt] = 40.00
  • Set Pounce_Height = 500.00
  • Set Pounce_Distance[Pounce_TempInt] = 10.00
  • Set Pounce_FlyingRate[Pounce_TempInt] = 400.00
All of those could go into the configuration trigger with the others

  • Unit - Move Pounce_Caster[Pounce_TempInt] instantly to Pounce_Point, facing Pounce_Angle[Pounce_TempInt] degrees
Really ought to be done with co-ordinates, considering the simplicity of the spell

All I have for now
 
1.Move the speed, height ,distance,Flyrate in the configuration trigger.
2.Use this method or formula for the arc:
(((4xMaxHeightof the Arc)/MaxDistance)x((MaxDistance-DistanceTravelled)x(DistanceTravelled/MaxDistance)))
If you use this,it will automatically change height and returns to 0.
3.Instead of using locations for moving,use coordinates just like what Tank-Commander and I and other spell coders do.
Here is a sample:
call SetUnitX(udg_Unit,GetUnitX(udg_Unit) + udg_Speed * Cos(udg_Angle * bj_DEGTORAD))
call SetUnitY(udg_Unit,GetUnitX(udg_Unit) + udg_Speed * Sin(udg_Angle * bj_DEGTORAD))
4.[trigger=]
Custom script: set bj_wantDestroyGroup=true
[/trigger]then picking the group?are you crazy?why not use call destroygroup itself
5.Check first the group 1 if it is not empty,then set the variable for random group then pick it,in this way,it wont bug.
Ex.
Set Group 1 = Unit Group Here.
If Number of unit in Group 1 greater than 0 then
set Group 2 = Random group
Pick units in Group 2
6.You leak the first group.
7.It is okay not to put the lightnings,we are talking about the code.

This spell has to make a lot of changes,then it will be approved.
 
Top