• 🏆 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!

[Spell] Jump System

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2011
Messages
326
Yea tried using it but i dont understand how it actually works . i mean i know indexi g and such ut cant seem to create a good jump spell without it looking retarded


EDIT:I mean i dont understand few lines like

  • Set JDA_JumpHigh_Distance = (0.33 x (Real((Level of (Ability being cast) for (Triggering unit)))))
and
  • Set JD_RealTimer[JD_Integers[3]] = (JD_RealTimer[JD_Integers[3]] + (180.00 / (JD_Distances[JD_Integers[3]] / JD_SpeedUnits[JD_Integers[3]])))
  • Set JD_JumpHigh[JD_Integers[3]] = ((Sin(JD_RealTimer[JD_Integers[3]])) x JD_HighSettings[JD_Integers[3]])
and ive read the info still dont get why is that like that
especially the (180.00 / (JD_Distances[JD_Integers[3]] / JD_SpeedUnits[JD_Integers[3] part.
 
Last edited:
Level 37
Joined
Jul 22, 2015
Messages
3,485
Unless you actually want to understand how the parabola is calculated, you only need to look at this trigger:

  • Actions to apply
    • Events
    • Conditions
    • Actions
      • -------- This are the actions to apply in your spell to use an effect of this system. --------
      • -------- --------
      • Set JDA_JumpHigh_Distance = 1.00
      • -------- This variable returns the base value of the high of the jump. --------
      • -------- The Jump´s high is calculated by the distance jumped and by this value. --------
      • -------- The higher this value is, the higher is the jump. I recommend to leave it at 1.00 . --------
      • -------- --------
      • Set JDA_DestroyTrees_Dash = True
      • -------- !Don´t pay attention to this variable if you have choosen the Jump effect! --------
      • -------- This variable returns whether the hero should destroy trees while dashing. --------
      • -------- Set this variable toTrue to destroy trees in the dashing unit´s way. --------
      • -------- --------
      • Set JDA_TargetPoint = (Target point of ability being cast)
      • -------- This returns where the target position of the Jump/Dash should be. --------
      • -------- --------
      • Set JDA_Unit = (Triggering unit)
      • -------- This returns the unit which shall jump/dash. --------
      • -------- --------
      • Set JDA_Speed = 10.00
      • -------- This returns the speed of the jump/dash. --------
      • -------- --------
      • Set JDA_SpecialEffect = Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl
      • -------- This returns the path for the used special effect. --------
      • -------- --------
      • Set JDA_Animation = slam
      • -------- This returns the animation of the unit jumping/dashing. --------
      • -------- --------
      • Set JDA_AnimationSpeed = 0.60
      • -------- This returns the animation speed of the jumping/dashing unit. --------
      • -------- --------
      • Trigger - Run Jump System 1 <gen> (checking conditions)
      • -------- After setting all needed variables, this calls the system to execute the choosen effects on the choosen unit/units. --------
      • -------- --------
 
Level 8
Joined
Nov 9, 2011
Messages
326
Unless you actually want to understand how the parabola is calculated, you only need to look at this trigger:

  • Actions to apply
    • Events
    • Conditions
    • Actions
      • -------- This are the actions to apply in your spell to use an effect of this system. --------
      • -------- --------
      • Set JDA_JumpHigh_Distance = 1.00
      • -------- This variable returns the base value of the high of the jump. --------
      • -------- The Jump´s high is calculated by the distance jumped and by this value. --------
      • -------- The higher this value is, the higher is the jump. I recommend to leave it at 1.00 . --------
      • -------- --------
      • Set JDA_DestroyTrees_Dash = True
      • -------- !Don´t pay attention to this variable if you have choosen the Jump effect! --------
      • -------- This variable returns whether the hero should destroy trees while dashing. --------
      • -------- Set this variable toTrue to destroy trees in the dashing unit´s way. --------
      • -------- --------
      • Set JDA_TargetPoint = (Target point of ability being cast)
      • -------- This returns where the target position of the Jump/Dash should be. --------
      • -------- --------
      • Set JDA_Unit = (Triggering unit)
      • -------- This returns the unit which shall jump/dash. --------
      • -------- --------
      • Set JDA_Speed = 10.00
      • -------- This returns the speed of the jump/dash. --------
      • -------- --------
      • Set JDA_SpecialEffect = Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl
      • -------- This returns the path for the used special effect. --------
      • -------- --------
      • Set JDA_Animation = slam
      • -------- This returns the animation of the unit jumping/dashing. --------
      • -------- --------
      • Set JDA_AnimationSpeed = 0.60
      • -------- This returns the animation speed of the jumping/dashing unit. --------
      • -------- --------
      • Trigger - Run Jump System 1 <gen> (checking conditions)
      • -------- After setting all needed variables, this calls the system to execute the choosen effects on the choosen unit/units. --------
      • -------- --------

Ive looked many times and tbh idk how it explains how its created.


EDIT: missread ur mesage. Also can someone delete this . I stopped trying
 
Last edited:
Level 37
Joined
Jul 22, 2015
Messages
3,485
Ive looked many times and tbh idk how it explains how its created.


EDIT: missread ur mesage. Also can someone delete this . I stopped trying

What do you not understand? Paladon documented everything in that trigger and tells you what variable does what. He even went as far as providing an extremely easy demo.

Let me know what you're trying to do and I can try simplifying the steps. Paladon's system is extremely GUI friendly, so you should not be intimidating by it.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
i just dont understand them.
That is the fun of a system, you dont have to understand it... it does everything for you.

Ive looked many times and tbh idk how it explains how its created.
"-------- After setting all needed variables, this calls the system to execute the choosen effects on the choosen unit/units. --------"
How hard is that?

Exactly i am
Why create something if someone else already made one?
Even I dont make systems that already have a properly working one in here. (Pretty much a big surprise to most :D)
 
Level 12
Joined
Jan 2, 2016
Messages
973
The equasion of the parabola is x = y^2 or y = x^2
In polar coordinates system - it's 2.d/(1-cos(tita))

If you want to simulate a jump - you need an initial y speed, and a x speed (let's say you will keep the x speed a constant, as it'd be a bit simpler).
So now you need an acceleration. The earth's acceleration is g = 9,81
so if your initial speed is 10 (m/s) upwards - after 1 second - it will be 0,19 m/s, and after 1 more second, it will be -8,62.
Anyways, you don't need to set the speed to 9,81 on your map (even if it's pixels, and not meters). You can probobly set it to something easier like 1000.
So what you need to do now is: give the unit some initial speed, and every 0,03-0,05 seconds - reduce that speed by 0,03x1000 - 0,05x1000, AND change the unit's z by the REMAINING speed amount x0,03-0,05. You also need to move the unit towards its jump destination, so futher you need to set its x and y coordinates.

EDIT: So now that you have the theory, what you need to do:
Make a trigger that adds units to a unit group (the units that are going to jump)
Save the jumping unit as a unit [array] variable, with unique index
Save the unit's horizontal and vertical speed in variables, with the unit's index
You could probobly save the angle it's jumping at as well
Run a trigger every 0,03 - 0,05 seconds:
Pick every unit from the jumping group
When you pick a unit: change it's z to ~its z~ + (~the vertical speed~ x ~the frequency of the trigger)
change the unit's position towards the jumping angle, with its horizontal speed
set its vertical speed to ~its vertical speed~ - (~the acceleration you want~ x ~the frequency of the trigger)
If the vertical speed becomes equal to ~negative value of the initial speed~ - remove the unit from the unit group.
 
Last edited:
Status
Not open for further replies.
Top