• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

JumpSystem v1.1[GUI][Better]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: .VTZ.
Jump System
Made by KhaosMachine


ezQfG.png

5xvyr.png



Credits and some info

Credits:
  • [*]KhaosMachine for the SYSTEM
    [*]Mathematics for the ECUATION
    [*]Tank-Commander for some tips

I made this system because IDK, I know there are much Jump systems, but this is the only GUI JUMP SYSTEM that works with only one trigger!

IF ANY CAN POST THE TRIGGERS FOR ME! THANKS!!! (I HAVE THE WORLD EDITOR ON SPANISH)...
zH8Wj.png

Keywords:
jump system, gui jump system, leap system, leap, jump, war3, world editor, how to jump, do jump, do leap, how to leap, easy
Contents

JumpSystem (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 18:14, 19th Jul 2012 Magtheridon96: To make this an ideal jump system, you should make it work for units that don't have an initial height of 0. Allow the user to give a unit, jump...

Moderator

M

Moderator

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

18:14, 19th Jul 2012
Magtheridon96:

  • To make this an ideal jump system, you should make it work for units that don't have an initial height of 0.
  • Allow the user to give a unit, jump speed and final coordinates (x, y, z)
  • Take into account the fact that flying height is not z.
    Z is flying height + terrain height.
    You can get the terrain height by having a location variable which you
    have to initialize to Location(0, 0) in custom scripts, and so that you don't have to leak it, you would move the location using the MoveLocation function. call MoveLocation(location, x, y).
    After moving the location, you can get the terrain height using GetLocationZ.
  • Don't use IsTerrainPathable, it's not your responsibility to check if the unit is ending up at a non-pathable point, it's the user's responsibility.
  • Your current method of indexing is out-dated.
    Use Hanky's dynamic index method.
 
Level 10
Joined
Aug 21, 2010
Messages
316

  • JumpSystem
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- CONFIGURABLE --------
      • -------- CONFIGURABLE --------
      • -------- CONFIGURABLE --------
      • -------- Frames per second of the jump --------
      • Set JumpSystem_FPS = 32.00
      • -------- UNCONFIGURABLE --------
      • -------- UNCONFIGURABLE --------
      • -------- UNCONFIGURABLE --------
      • Set TempPoint = (Center of (Playable map area))
      • Unit - Create 1 Peasant for Neutral Hostile at TempPoint facing 0.00 degrees
      • Set JumpSystem_Harvester = (Last created unit)
      • Unit - Hide JumpSystem_Harvester
      • Unit - Add Invulnerable (Neutral) to JumpSystem_Harvester
      • Set JumpSystem_FPS = (1.00 / JumpSystem_FPS)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: endfunction
      • Custom script: function jumpSystem_Timer takes nothing returns nothing
      • For each (Integer JumpSystem_Index[2]) from 1 to JumpSystem_Index[1], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • JumpSystem_Boolean[JumpSystem_Index[2]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • JumpSystem_CurrentDistance[JumpSystem_Index[2]] Less than or equal to JumpSystem_FinalDistance[JumpSystem_Index[2]]
                • Then - Actions
                  • Set TempPoint = (Position of JumpSystem_Target[JumpSystem_Index[2]])
                  • Set TempPoint = (TempPoint offset by JumpSystem_Speed[JumpSystem_Index[2]] towards JumpSystem_Angle[JumpSystem_Index[2]] degrees)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at TempPoint of type Flyability is off) Equal to False
                    • Then - Actions
                      • Custom script: call SetUnitPositionLoc(udg_JumpSystem_Target[udg_JumpSystem_Index[2]], udg_TempPoint)
                    • Else - Actions
                  • Animation - Change JumpSystem_Target[JumpSystem_Index[2]] flying height to ((4.00 x JumpSystem_Height[JumpSystem_Index[2]]) x (JumpSystem_CurrentDistance[JumpSystem_Index[2]] x ((JumpSystem_FinalDistance[JumpSystem_Index[2]] - JumpSystem_CurrentDistance[JumpSystem_Index[2]]) / (JumpSystem_FinalDistance[JumpSystem_Index[2]] x JumpSys at 0.00
                  • Set JumpSystem_CurrentDistance[JumpSystem_Index[2]] = (JumpSystem_CurrentDistance[JumpSystem_Index[2]] + JumpSystem_Speed[JumpSystem_Index[2]])
                  • Custom script: call RemoveLocation(udg_TempPoint)
                • Else - Actions
                  • Set TempPoint = (Position of JumpSystem_Target[JumpSystem_Index[2]])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • JumpSystem_DestroyTrees[JumpSystem_Index[2]] Equal to True
                    • Then - Actions
                      • Custom script: set bj_wantDestroyGroup = true
                      • Destructible - Pick every destructible within 200.00 of TempPoint and do (Actions)
                        • Loop - Actions
                          • Set TempDestructable = (Picked destructible)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Current life of TempDestructable) Greater than 0.00
                            • Then - Actions
                              • Unit - Order JumpSystem_Harvester to Harvest TempDestructable
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Current order of JumpSystem_Harvester) Equal to (Order(harvest))
                                • Then - Actions
                                  • Destructible - Kill TempDestructable
                                • Else - Actions
                            • Else - Actions
                    • Else - Actions
                  • Special Effect - Create a special effect at TempPoint using JumpSystem_SpecialEffect[JumpSystem_Index[2]]
                  • Special Effect - Destroy (Last created special effect)
                  • Animation - Change JumpSystem_Target[JumpSystem_Index[2]] flying height to 0.00 at 0.00
                  • Special Effect - Destroy JumpSystem_MovementEffect[JumpSystem_Index[2]]
                  • Unit - Turn collision for JumpSystem_Target[JumpSystem_Index[2]] On
                  • Unit - Unpause JumpSystem_Target[JumpSystem_Index[2]]
                  • Set JumpSystem_Boolean[JumpSystem_Index[2]] = False
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • JumpSystem_Boolean[JumpSystem_Index[2]] Equal to False
                    • Then - Actions
                      • Set JumpSystem_Index[0] = (JumpSystem_Index[0] - 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • JumpSystem_Index[0] Equal to 0
                        • Then - Actions
                          • Set JumpSystem_Index[1] = 0
                          • Countdown Timer - Pause JumpSystem_Timer
                        • Else - Actions
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_TempPoint)
            • Else - Actions
      • Custom script: endfunction
      • Custom script: function jumpSystem_Start takes nothing returns nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • JumpSystem_Index[0] Equal to 0
        • Then - Actions
          • Custom script: call TimerStart(udg_JumpSystem_Timer, udg_JumpSystem_FPS, true, function jumpSystem_Timer)
        • Else - Actions
      • Set JumpSystem_Index[0] = (JumpSystem_Index[0] + 1)
      • Set JumpSystem_Index[1] = (JumpSystem_Index[1] + 1)
      • Set JumpSystem_Target[JumpSystem_Index[1]] = JS_Target
      • Set JumpSystem_Angle[JumpSystem_Index[1]] = JS_Angle
      • Set JumpSystem_CurrentDistance[JumpSystem_Index[1]] = 0.00
      • Set JumpSystem_FinalDistance[JumpSystem_Index[1]] = JS_FinalDistance
      • Custom script: set udg_JumpSystem_Speed[udg_JumpSystem_Index[1]] = udg_JS_Speed * udg_JumpSystem_FPS
      • Set JumpSystem_DestroyTrees[JumpSystem_Index[1]] = JS_DestroyTrees
      • Set JumpSystem_Height[JumpSystem_Index[1]] = JS_Height
      • Set JumpSystem_SpecialEffect[JumpSystem_Index[1]] = JS_SpecialEffect
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • JS_MovementEffect Not equal to <Empty String>
        • Then - Actions
          • Special Effect - Create a special effect attached to the JS_AttachPoint of JS_Target using JS_MovementEffect
          • Set JumpSystem_MovementEffect[JumpSystem_Index[1]] = (Last created special effect)
        • Else - Actions
      • Unit - Add Crow Form to JS_Target
      • Unit - Remove Crow Form from JS_Target
      • Unit - Turn collision for JS_Target Off
      • Unit - Pause JS_Target
      • Set JumpSystem_Boolean[JumpSystem_Index[1]] = True
      • Set JS_Angle = 0.00
      • Set JS_FinalDistance = 0.00
      • Set JS_Height = 0.00
      • Set JS_Speed = 0.00
      • Set JS_Target = No unit
      • Set JS_DestroyTrees = False
      • Set JS_SpecialEffect = <Empty String>
      • Set JS_MovementEffect = <Empty String>
      • Set JS_AttachPoint = <Empty String>
  • Jump When Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempPoint = (Position of (Attacking unit))
      • Set TempPoint2 = (Position of TempUnit)
      • Set JS_Angle = (Angle from TempPoint to TempPoint2)
      • Set TempPoint = (TempPoint2 offset by (Random real number between 400.00 and 750.00) towards JS_Angle degrees)
      • Set JS_FinalDistance = (Distance between TempPoint2 and TempPoint)
      • Set JS_Height = 400.00
      • Set JS_Speed = 600.00
      • Set JS_Target = TempUnit
      • Set JS_DestroyTrees = True
      • Set JS_SpecialEffect = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Custom script: call ExecuteFunc("jumpSystem_Start")
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
  • Jump When Stomp
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to War Stomp
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempPoint = (Position of TempUnit)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 300.00 of TempPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of TempU and do (Actions)
        • Loop - Actions
          • Set JS_Target = (Picked unit)
          • Set TempPoint2 = (Position of JS_Target)
          • Set JS_Angle = (Angle from TempPoint to TempPoint2)
          • Set JS_Speed = (Random real number between 350.00 and 700.00)
          • Set JS_FinalDistance = (Random real number between 400.00 and 700.00)
          • Set JS_Height = (Random real number between 200.00 and 450.00)
          • Set JS_SpecialEffect = Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
          • Set JS_MovementEffect = Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
          • Set JS_AttachPoint = chest
          • Set JS_DestroyTrees = True
          • Custom script: call RemoveLocation(udg_TempPoint2)
          • Custom script: call ExecuteFunc("jumpSystem_Start")
      • Custom script: call RemoveLocation(udg_TempPoint)
  • How to use
    • Events
    • Conditions
    • Actions
      • -------- SET THE TARGET THAT YOU WANT TO JUMP --------
      • Set JS_Target = (Random unit from (Units in (Playable map area)))
      • -------- SET THE ANGLE OF THE JUMP --------
      • Set JS_Angle = (Random angle)
      • -------- SET THE DISTANCE OF THE JUMP --------
      • Set JS_FinalDistance = (Random real number between 500.00 and 800.00)
      • -------- SET THE MAX HEIGHT OF THE JUMP --------
      • Set JS_Height = (Random real number between 300.00 and 400.00)
      • -------- SET THE SPEED OF THE JUMP --------
      • Set JS_Speed = (Random real number between 400.00 and 600.00)
      • -------- IF YOU WANT TO DESTROY TREES WHEN THE TARGET IMPACTS --------
      • Set JS_DestroyTrees = True
      • -------- SPECIAL EFFECT WHEN THE TARGET IMPACTS --------
      • Set JS_SpecialEffect = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • -------- STATIC SPECIAL EFFECT WHEN THE TARGET MOVES --------
      • Set JS_MovementEffect = Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
      • -------- ATTACH POINT OF THE MOVEMENT EFFECT --------
      • Set JS_AttachPoint = chest
      • -------- CALL THE SYSTEM --------
      • Custom script: call ExecuteFunc("jumpSystem_Start")



What is this???

  • Set TempPoint = (Position of JumpSystem_Target[JumpSystem_Index[2]])
  • Set TempPoint = (TempPoint offset by JumpSystem_Speed[JumpSystem_Index[2]] towards JumpSystem_Angle[JumpSystem_Index[2]] degrees)
 
Last edited:
Since when did GUI Jump systems have or need more than one trigger? GUI Jump systems shouldn't need more than one trigger, although all jump systems /do/ because you have to have a way of activation (which is what every other jump system has) I know the point of this one is that it only uses one, but nobody in their right mind would use one which didn't use more than one trigger, and the others which don't actually probably just use a built-in example which "counts" as part of it, I highly doubt that this is the only one with a single trigger, which is effectively a ran loop. it'd only actually take about 10 minutes to create a clone of this system which doesn't visually have any difference, but also only uses one trigger, but the trigger would be a loop instead of a map initialisation, this really needs something real to definitively seperate it from other jump systems for it to be considered for approval if you asked me tbh.

To make this "better" than other jump systems you'd also need to change it to Co-ordinates instead of "SetUnitPositionLoc"

Additionally, you leak a TempPoint (you set it twice to different things one after the other)

You need more comments in the system if you want to have all these sub-functions into it, the code isn't at all readable because of the lack of definitive splits between the sections.
 
Level 12
Joined
Dec 17, 2009
Messages
951
That's assuming "some random" is a person who doesn't know how to make spells in general, jump systems are one of the most basic things to create, also out of curiousity, does this system have collision with wall detection?

random spells*
 
by wall detection I didn't mean as in lack of pathing (although that's good because before you could've jumped out of the screen I imagine, but as in jumping not being automatically increased in the terrain you're jumping to is too high or if a wall (which is very high) is too high for you to cross without changing the arc and making you simply go over it
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
Mathematics for the ECUATION
Huh? XD

Anyhow I agree with Tank with more points:

"call ExecuteFunc()"???? You are implementing multiple functions inside GUI in 1 trigger ? O_O
This is also not how you properly call a function in jass.

Wouldn't it then better to have a jass/vjass version of a system and just a GUI block extending it to be more user friendly that way?

Another solution would be simply adding 2 more triggers and doing run trigger without checking conditions since those functions take no arguments.

The code is a mess imo, and not to be offensive but most people in the end rewrite the jump part of the system inside the spell when making a GUI spell anyway.
 
Level 8
Joined
Dec 30, 2011
Messages
134
Huh? XD

Anyhow I agree with Tank with more points:

"call ExecuteFunc()"???? You are implementing multiple functions inside GUI in 1 trigger ? O_O
This is also not how you properly call a function in jass.

Wouldn't it then better to have a jass/vjass version of a system and just a GUI block extending it to be more user friendly that way?

Another solution would be simply adding 2 more triggers and doing run trigger without checking conditions since those functions take no arguments.

The code is a mess imo, and not to be offensive but most people in the end rewrite the jump part of the system inside the spell when making a GUI spell anyway.

I can made it in Jass o vJass but the people usemore GUI...
About that function (call ExecuteFunc("jumpSystem_Start")), it only execute the starter function man, it's a nice and useful function to call anothers,,,
 
Level 11
Joined
May 13, 2010
Messages
167
Since when did GUI Jump systems have or need more than one trigger? GUI Jump systems shouldn't need more than one trigger, although all jump systems /do/ because you have to have a way of activation (which is what every other jump system has) I know the point of this one is that it only uses one, but nobody in their right mind would use one which didn't use more than one trigger, and the others which don't actually probably just use a built-in example which "counts" as part of it, I highly doubt that this is the only one with a single trigger, which is effectively a ran loop. it'd only actually take about 10 minutes to create a clone of this system which doesn't visually have any difference, but also only uses one trigger, but the trigger would be a loop instead of a map initialisation, this really needs something real to definitively seperate it from other jump systems for it to be considered for approval if you asked me tbh.

To make this "better" than other jump systems you'd also need to change it to Co-ordinates instead of "SetUnitPositionLoc"

Additionally, you leak a TempPoint (you set it twice to different things one after the other)

You need more comments in the system if you want to have all these sub-functions into it, the code isn't at all readable because of the lack of definitive splits between the sections.

Agreed. Coding seems nice but it needs conceptual improvements. I really don't know what else is to add to a jump system, but what we have here is definetly something similar to some of the systems created before.
 
Level 10
Joined
Aug 21, 2010
Messages
316
I think it's purely a waste of time to make a jump system because most of the maps(100%) that have a bunch of heroes have one or two spells which are based on jump.

I think it would be better if you worked on a buff GUI system or something similar because such systems are very rare here(at least those who are worth something)

I agree that this system made excellent,but simply the application of this system is very small.

As for coding 4/5 +rep
 
Top