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

JUMP SYSTEM v1.0.0

+ UPDATE VERSION 1.0.0
+ FIX WHAT BRIBE AND MAG96 SAYS :d
+ Requires: GUI's UNIT INDEXER by Bribe SPECIAL TKS TO BRIBE...........
+ ADD A SPELL CALLED SPLIT BOOM LIKE A EXAMPLE OF JUMP SYSTEM
+

-
  • INTIALIZATION
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set DUMMY = DUMMY
      • Set TEMP_LOC = (Point(0.00, 0.00))
      • Set JUMP_LOOP = 0.02
      • Set UnitIndexerEnabled = False
      • Unit - Create 1 Peasant for Neutral Passive at TEMP_LOC facing 0.00 degrees
      • Set HARVESTER = (Last created unit)
      • Unit - Hide HARVESTER
      • Unit - Make HARVESTER Invulnerable
      • Set UnitIndexerEnabled = True
      • Trigger - Add to JUMP LOOP <gen> the event (Time - Every JUMP_LOOP seconds of game time)
- Save the value:
  • JUMP INSTALL
    • Events
    • Conditions
    • Actions
      • Unit - Add Storm Crow Form to JUMP_UNIT
      • Unit - Remove Storm Crow Form from JUMP_UNIT
      • -------- CREATE DUMMY TO INDEX UNIT JUMP --------
      • Unit - Create 1 DUMMY for Neutral Passive at JUMP_POINTA facing Default building facing degrees
      • Unit - Add a JUMP_TIME second Generic expiration timer to (Last created unit)
      • Set JUMP_VALUE = (Custom value of (Last created unit))
      • Unit Group - Add (Last created unit) to JUMP_GROUP
      • -------- SAVE VALUE --------
      • Set Jump_UNIT[JUMP_VALUE] = JUMP_UNIT
      • Set Jump_COUNT[JUMP_VALUE] = (Integer((JUMP_TIME / JUMP_LOOP)))
      • Set Jump_HEIGHT[JUMP_VALUE] = JUMP_HEIGHT
      • Set Jump_AOE[JUMP_VALUE] = JUMP_AOE
      • Set Jump_AX[JUMP_VALUE] = (X of JUMP_POINTA)
      • Set Jump_AY[JUMP_VALUE] = (Y of JUMP_POINTA)
      • Set Jump_BX[JUMP_VALUE] = (X of JUMP_POINTB)
      • Set Jump_BY[JUMP_VALUE] = (Y of JUMP_POINTB)
      • Set Jump_SPEED[JUMP_VALUE] = ((Distance between JUMP_POINTA and JUMP_POINTB) / (Real(Jump_COUNT[JUMP_VALUE])))
      • Set Jump_DEFAULTHEIGHT[JUMP_VALUE] = (Default flying height of JUMP_UNIT)
      • Set Jump_D[JUMP_VALUE] = (180.00 / (Real(Jump_COUNT[JUMP_VALUE])))
      • Set Jump_COLLISION[JUMP_VALUE] = JUMP_COLLISION
      • Set Jump_TREE[JUMP_VALUE] = JUMP_TREE
      • Set Jump_SFXPM[JUMP_VALUE] = JUMP_SFXPM
      • Set Jump_SFXPMATTACHMENT[JUMP_VALUE] = JUMP_SFXPMATTACHMENT
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • JUMP_ATTACHMENT Not equal to <Empty String>
          • JUMP_SFXPMATTACHMENT Not equal to <Empty String>
        • Then - Actions
          • Special Effect - Create a special effect attached to the JUMP_ATTACHMENT of JUMP_UNIT using JUMP_SFXATTACHMENT
          • Set Jump_SFXATTACHMENT[JUMP_VALUE] = (Last created special effect)
        • Else - Actions
      • Trigger - Turn on JUMP LOOP <gen>
      • Set JUMP_AOE = 0.00
      • Set JUMP_HEIGHT = 0.00
      • Set JUMP_COLLISION = True
      • Set JUMP_TREE = False
      • Set JUMP_SFXATTACHMENT = <Empty String>
      • Set JUMP_SFXPM = <Empty String>
      • Set JUMP_ATTACHMENT = <Empty String>
      • Set JUMP_SFXPMATTACHMENT = <Empty String>
      • Custom script: call RemoveLocation(udg_JUMP_POINTA)
      • Custom script: call RemoveLocation(udg_JUMP_POINTB)
I've used custom value the main varribles of system.
- Trigger Loop:
  • JUMP LOOP
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (JUMP_GROUP is empty) Not equal to True
        • Then - Actions
          • Unit Group - Pick every unit in JUMP_GROUP and do (Actions)
            • Loop - Actions
              • Set JUMP_VALUE = (Custom value of (Picked unit))
              • Set JUMP_UNIT = Jump_UNIT[JUMP_VALUE]
              • Set JUMP_POINTA = (Point(Jump_AX[JUMP_VALUE], Jump_AY[JUMP_VALUE]))
              • Set JUMP_POINTB = (Point(Jump_BX[JUMP_VALUE], Jump_BY[JUMP_VALUE]))
              • Set TEMP_LOC = (Position of JUMP_UNIT)
              • Set TEMP_LOC2 = (TEMP_LOC offset by Jump_SPEED[JUMP_VALUE] towards (Angle from JUMP_POINTA to JUMP_POINTB) degrees)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Jump_COUNT[JUMP_VALUE] Less than or equal to 0
                • Then - Actions
                  • Unit - Turn collision for JUMP_UNIT On
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Jump_TREE[JUMP_VALUE] Equal to True
                    • Then - Actions
                      • Destructible - Pick every destructible within Jump_AOE[JUMP_VALUE] of TEMP_LOC2 and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Current life of (Picked destructible)) Greater than 0.00
                            • Then - Actions
                              • Unit - Order HARVESTER to Harvest (Picked destructible)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Current order of HARVESTER) Equal to (Order(harvest))
                                • Then - Actions
                                  • Destructible - Kill (Picked destructible)
                                • Else - Actions
                            • Else - Actions
                              • Unit - Order HARVESTER to Stop
                    • Else - Actions
                  • Special Effect - Destroy Jump_SFXATTACHMENT[JUMP_VALUE]
                • Else - Actions
              • Unit - Move JUMP_UNIT instantly to TEMP_LOC2
              • Set TEMP_REAL = (Jump_HEIGHT[JUMP_VALUE] x (Sin(((Real(Jump_COUNT[JUMP_VALUE])) x Jump_D[JUMP_VALUE]))))
              • Set TEMP_REAL = (TEMP_REAL + Jump_DEFAULTHEIGHT[JUMP_VALUE])
              • Animation - Change JUMP_UNIT flying height to TEMP_REAL at 0.00
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Jump_SFXPM[JUMP_VALUE] Not equal to <Empty String>
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Jump_SFXPMATTACHMENT[JUMP_VALUE] Equal to <Empty String>
                    • Then - Actions
                      • Special Effect - Create a special effect at TEMP_LOC2 using Jump_SFXPM[JUMP_VALUE]
                    • Else - Actions
                      • Special Effect - Create a special effect attached to the Jump_SFXPMATTACHMENT[JUMP_VALUE] of JUMP_UNIT using Jump_SFXPM[JUMP_VALUE]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Jump_COLLISION[JUMP_VALUE] Equal to True
                • Then - Actions
                  • Unit - Turn collision for JUMP_UNIT On
                • Else - Actions
                  • Unit - Turn collision for JUMP_UNIT Off
              • Set Jump_COUNT[JUMP_VALUE] = (Jump_COUNT[JUMP_VALUE] - 1)
              • Custom script: call RemoveLocation(udg_TEMP_LOC)
              • Custom script: call RemoveLocation(udg_TEMP_LOC2)
              • Custom script: call RemoveLocation(udg_JUMP_POINTA)
              • Custom script: call RemoveLocation(udg_JUMP_POINTB)
        • Else - Actions
          • Trigger - Turn off (This trigger)


+ HOW TO USE IT .... THIS IS EXAMPLE:
  • EXAMPLE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Carrion Swarm
    • Actions
      • Set JUMP_UNIT = (Triggering unit)
      • Set JUMP_AOE = 200.00
      • Set JUMP_TREE = True
      • Set JUMP_COLLISION = False
      • Set JUMP_HEIGHT = 500.00
      • Set JUMP_POINTA = (Position of JUMP_UNIT)
      • Set JUMP_POINTB = (Target point of ability being cast)
      • Set JUMP_TIME = 1.50
      • Set JUMP_SFXATTACHMENT = Abilities\Spells\Demon\DarkConversion\ZombifyTarget.mdl
      • Set JUMP_SFXPM = Abilities\Spells\Undead\ReplenishMana\SpiritTouchTarget.mdl
      • Set JUMP_SFXPMATTACHMENT = overhead
      • Set JUMP_ATTACHMENT = origin
      • Trigger - Run JUMP INSTALL <gen> (ignoring conditions)
- JUMP_COLLSION = TRUE => TURN ON COLLISION OF JUMP UNIT
- JUMP_COLLISION = FALSE => TURN OFF COLLISION OF JUMP UNIT
- JUMP_TREE = TRUE => KILL TREE
- JUMP_TREE = FALSE => NOT KILL TREE

BONUS SPLIT BOOM

  • SPLIT BOOM INIT
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set SPLITBOOM_DUMMY[1] = BOOM
      • Set SPLITBOOM_DUMMY[2] = BOOM EXPLODE
  • SPLIT BOOM
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Carrion Swarm
    • Actions
      • Set JUMP_POINTA = (Position of (Triggering unit))
      • Unit - Create 1 SPLITBOOM_DUMMY[1] for (Owner of (Triggering unit)) at JUMP_POINTA facing (Facing of (Triggering unit)) degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Set ID = (Custom value of (Last created unit))
      • Set SPLITBOOM_AOE[ID] = 500.00
      • Set SPLITBOOM_COUNT[ID] = 5
      • Set SPLITBOOM_DAMAGE[ID] = 400.00
      • Set SPLITBOOM_HEIGHT[ID] = 700.00
      • Set SPLITBOOM_SCALE[ID] = 400.00
      • Set SPLITBOOM_DEGREE[ID] = (Facing of (Last created unit))
      • Set JUMP_UNIT = (Last created unit)
      • Set JUMP_AOE = SPLITBOOM_AOE[ID]
      • Set JUMP_TREE = True
      • Set JUMP_COLLISION = False
      • Set JUMP_HEIGHT = SPLITBOOM_HEIGHT[ID]
      • Set JUMP_POINTB = (JUMP_POINTA offset by 500.00 towards (Facing of (Triggering unit)) degrees)
      • Set JUMP_TIME = 1.00
      • Set JUMP_SFXATTACHMENT = <Empty String>
      • Set JUMP_SFXPM = <Empty String>
      • Set JUMP_SFXPMATTACHMENT = <Empty String>
      • Set JUMP_ATTACHMENT = <Empty String>
      • Trigger - Run JUMP INSTALL <gen> (ignoring conditions)
  • SPLIT BOOM DIE CHECK
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to SPLITBOOM_DUMMY[1]
    • Actions
      • Set TEMP_UNIT = (Triggering unit)
      • Set ID = (Custom value of TEMP_UNIT)
      • Set TEMP_LOC = (Position of TEMP_UNIT)
      • Set UnitIndexerEnabled = False
      • Unit - Create 1 SPLITBOOM_DUMMY[2] for (Owner of TEMP_UNIT) at TEMP_LOC facing 0.00 degrees
      • Animation - Change (Last created unit)'s size to (SPLITBOOM_SCALE[ID]%, SPLITBOOM_SCALE[ID]%, SPLITBOOM_SCALE[ID]%) of its original size
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Set UnitIndexerEnabled = True
      • Set TEMP_GROUP = (Units within SPLITBOOM_AOE[ID] of TEMP_LOC)
      • Unit Group - Pick every unit in TEMP_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 Mechanical) Not equal to True
              • ((Picked unit) is An Ancient) Not equal to True
              • ((Picked unit) belongs to an enemy of (Owner of TEMP_UNIT)) Equal to True
            • Then - Actions
              • Unit - Cause TEMP_UNIT to damage (Picked unit), dealing SPLITBOOM_DAMAGE[ID] damage of attack type Spells and damage type Normal
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SPLITBOOM_COUNT[ID] Greater than 0
        • Then - Actions
          • Set SPLITBOOM_SCALE[ID] = (SPLITBOOM_SCALE[ID] / 1.42)
          • Set SPLITBOOM_DAMAGE[ID] = (SPLITBOOM_DAMAGE[ID] / 2.00)
          • Set SPLITBOOM_AOE[ID] = (SPLITBOOM_AOE[ID] / 1.30)
          • Set SPLITBOOM_HEIGHT[ID] = (SPLITBOOM_HEIGHT[ID] / 1.42)
          • Set SPLITBOOM_COUNT[ID] = (SPLITBOOM_COUNT[ID] - 1)
          • -------- --------
          • Set SPLITBOOM_DEGREE[ID2] = (SPLITBOOM_DEGREE[ID] + 30.00)
          • Unit - Create 1 BOOM for (Owner of TEMP_UNIT) at TEMP_LOC facing SPLITBOOM_DEGREE[ID2] degrees
          • Animation - Change (Last created unit)'s size to (SPLITBOOM_SCALE[ID]%, SPLITBOOM_SCALE[ID]%, SPLITBOOM_SCALE[ID]%) of its original size
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Set ID2 = (Custom value of (Last created unit))
          • Set SPLITBOOM_SCALE[ID2] = SPLITBOOM_SCALE[ID]
          • Set SPLITBOOM_DAMAGE[ID2] = SPLITBOOM_DAMAGE[ID]
          • Set SPLITBOOM_AOE[ID2] = SPLITBOOM_AOE[ID]
          • Set SPLITBOOM_HEIGHT[ID2] = SPLITBOOM_HEIGHT[ID]
          • Set SPLITBOOM_COUNT[ID2] = SPLITBOOM_COUNT[ID]
          • Set TEMP_LOC2 = (TEMP_LOC offset by 500.00 towards SPLITBOOM_DEGREE[ID2] degrees)
          • -------- JUMP --------
          • Set JUMP_UNIT = (Last created unit)
          • Set JUMP_AOE = SPLITBOOM_AOE[ID]
          • Set JUMP_TREE = True
          • Set JUMP_COLLISION = False
          • Set JUMP_HEIGHT = SPLITBOOM_HEIGHT[ID]
          • Set JUMP_POINTA = TEMP_LOC
          • Set JUMP_POINTB = TEMP_LOC2
          • Set JUMP_TIME = 1.00
          • Set JUMP_SFXATTACHMENT = <Empty String>
          • Set JUMP_SFXPM = <Empty String>
          • Set JUMP_SFXPMATTACHMENT = <Empty String>
          • Set JUMP_ATTACHMENT = <Empty String>
          • Trigger - Run JUMP INSTALL <gen> (ignoring conditions)
          • Trigger - Run SPLIT BOOM DIE CHECK 2 <gen> (checking conditions)
          • -------- END JUMP --------
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TEMP_LOC)
      • Custom script: call RemoveLocation(udg_TEMP_LOC2)
  • SPLIT BOOM DIE CHECK 2
    • Events
    • Conditions
    • Actions
      • Set TEMP_LOC = (Position of TEMP_UNIT)
      • -------- --------
      • Set SPLITBOOM_DEGREE[ID2] = (SPLITBOOM_DEGREE[ID] - 30.00)
      • Unit - Create 1 BOOM for (Owner of TEMP_UNIT) at TEMP_LOC facing SPLITBOOM_DEGREE[ID2] degrees
      • Animation - Change (Last created unit)'s size to (SPLITBOOM_SCALE[ID]%, SPLITBOOM_SCALE[ID]%, SPLITBOOM_SCALE[ID]%) of its original size
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Set ID2 = (Custom value of (Last created unit))
      • Set SPLITBOOM_SCALE[ID2] = SPLITBOOM_SCALE[ID]
      • Set SPLITBOOM_DAMAGE[ID2] = SPLITBOOM_DAMAGE[ID]
      • Set SPLITBOOM_AOE[ID2] = SPLITBOOM_AOE[ID]
      • Set SPLITBOOM_HEIGHT[ID2] = SPLITBOOM_HEIGHT[ID]
      • Set SPLITBOOM_COUNT[ID2] = SPLITBOOM_COUNT[ID]
      • Set TEMP_LOC2 = (TEMP_LOC offset by 500.00 towards SPLITBOOM_DEGREE[ID2] degrees)
      • -------- JUMP --------
      • Set JUMP_UNIT = (Last created unit)
      • Set JUMP_AOE = SPLITBOOM_AOE[ID]
      • Set JUMP_TREE = True
      • Set JUMP_COLLISION = False
      • Set JUMP_HEIGHT = SPLITBOOM_HEIGHT[ID]
      • Set JUMP_POINTA = TEMP_LOC
      • Set JUMP_POINTB = TEMP_LOC2
      • Set JUMP_TIME = 1.00
      • Set JUMP_SFXATTACHMENT = <Empty String>
      • Set JUMP_SFXPM = <Empty String>
      • Set JUMP_SFXPMATTACHMENT = <Empty String>
      • Set JUMP_ATTACHMENT = <Empty String>
      • Trigger - Run JUMP INSTALL <gen> (ignoring conditions)
      • -------- END JUMP --------
      • Custom script: call RemoveLocation(udg_TEMP_LOC)
      • Custom script: call RemoveLocation(udg_TEMP_LOC2)
SPECIAL THANKS TO LEONGUYEN112

I HOPE YOU LIKE IT!!

YM: [email protected]

Keywords:
jump, hashtable, system, btdonald
Contents

JUMP SYSTEM (Map)

Reviews
1 Feb 2012 Bribe: I like this better than Paladon's system - namely that yours doesn't destroy bridges makes it a safer alternative. Since I can't fault the script, I recommend approving your documentation and applying that last change I pointed out...

Moderator

M

Moderator

1 Feb 2012
Bribe: I like this better than Paladon's system - namely that yours doesn't destroy bridges makes it a safer alternative. Since I can't fault the script, I recommend approving your documentation and applying that last change I pointed out to you.

Approved 4/5.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
In my opinion you shouldn't use unit indexer with hashtables. Instead of custom value provided by unit indexer, you should use the handle id of the unit.

If you want to use unit indexer then use arrays.

What does your system have over this: www.hiveworkshop.com/forums/spells-569/jump-system-paladon-116556/

As your system doesn't seem to bring anything new to the table, I'm finding it hard to approve.
 
Level 11
Joined
Dec 3, 2011
Messages
366
In my opinion you shouldn't use unit indexer with hashtables. Instead of custom value provided by unit indexer, you should use the handle id of the unit.

If you want to use unit indexer then use arrays.

What does your system have over this: www.hiveworkshop.com/forums/spells-569/jump-system-paladon-116556/

As your system doesn't seem to bring anything new to the table, I'm finding it hard to approve.

I think it's useful in some situations. I think unit jump with this system is pretty - arc than another system :vw_sad:
 
Instead of all these values, I recommend just checking if J_SFXPMATTACHMENT[JUMP_VALUE] is equal to <Empty string>.

  • J_SFXPMATTACHMENT[JUMP_VALUE] Not equal to origin
  • J_SFXPMATTACHMENT[JUMP_VALUE] Not equal to head
  • J_SFXPMATTACHMENT[JUMP_VALUE] Not equal to chest
  • J_SFXPMATTACHMENT[JUMP_VALUE] Not equal to overhead
  • J_SFXPMATTACHMENT[JUMP_VALUE] Not equal to hand left
  • J_SFXPMATTACHMENT[JUMP_VALUE] Not equal to hand right
  • J_SFXPMATTACHMENT[JUMP_VALUE] Not equal to sphere first
  • J_SFXPMATTACHMENT[JUMP_VALUE] Not equal to sphere second
  • J_SFXPMATTACHMENT[JUMP_VALUE] Not equal to sphere third
  • J_SFXPMATTACHMENT[JUMP_VALUE] Not equal to sphere fourth
  • J_SFXPMATTACHMENT[JUMP_VALUE] Not equal to sphere fifth
  • J_SFXPMATTACHMENT[JUMP_VALUE] Not equal to sphere sixth
 
Top