What is wrong with this Jump spell?

Fluffball

Well-Known Member
Reaction score
35
Code:
Jump
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
    Actions
        Set TempPoint = (Target point of ability being cast)
        Set TempPoint2 = (Position of (Casting unit))
        Set Angle = ((Angle from TempPoint to TempPoint2) - 180.00)
        Set TempReal = (Distance between TempPoint and TempPoint2)
        Unit - Add Jump(CrowForm)  to (Casting unit)
        Unit - Set level of Jump(CrowForm)  for (Casting unit) to 1
        Unit - Order (Casting unit) to Night Elf Druid Of The Talon - Storm Crow Form
        Unit - Add classification of A flying unit to (Casting unit)
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
                Set TempPoint3 = (TempPoint2 offset by (TempReal / (250.00 + Gravity)) towards Angle degrees)
                Animation - Change (Casting unit) flying height to ((Current flying height of (Casting unit)) + (1.00 x Gravity)) at 99999.00
                Set Gravity = (Gravity + 0.04)
                Unit - Move (Casting unit) instantly to TempPoint3
                Set TempPoint2 = (Position of (Casting unit))
                Wait 0.01 seconds
        Set Gravity = 1.00
        For each (Integer A) from 1 to 40, do (Actions)
            Loop - Actions
                Set TempPoint3 = (TempPoint2 offset by (TempReal / (500.00 + Gravity)) towards Angle degrees)
                Unit - Move (Casting unit) instantly to TempPoint3
                Animation - Change (Casting unit) flying height to ((Current flying height of (Casting unit)) + (0.25 x Gravity)) at 99999.00
                Wait 0.02 seconds
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
                Set TempPoint3 = (TempPoint2 offset by (TempReal / (250.00 + Gravity)) towards Angle degrees)
                Animation - Change (Casting unit) flying height to ((Current flying height of (Casting unit)) - (1.00 x Gravity)) at 99999.00
                Set Gravity = (Gravity - 0.04)
                Unit - Move (Casting unit) instantly to TempPoint3
                Set TempPoint2 = (Position of (Casting unit))
                Wait 0.01 seconds

Ok, so Jump, is a shockwave ability (with all the effects, dmgs, etc nulled) and Jump(CrowForm) is just crow form. The caster doesn't seem to move and moves choppily (moves a large amount at a time, doesn't slide). Please tell me what is wrong, or if i should give up and try to make a JASS version... or just use Emiljrs one.
 

vypur85

Hibernate
Reaction score
803
The main problem is this:

'Wait 0.01 seconds'

  1. Wait is very very inaccurate when it comes to small numbers.
  2. 'Casting unit' may be lost after the wait. Using 'Triggering unit' is a better choice though this won't solve your problem. You'll need a periodic timer or timer to achieve smooth sliding-type movement.
 

Fluffball

Well-Known Member
Reaction score
35
Ok, so i make a repeating timer, and when it expires make the unit move?

And what about the flying prob?
 

vypur85

Hibernate
Reaction score
803
> what about the flying prob?

It was the wait. Flying and sliding are the same thing. It's just periodic movement on a particular axis. Either way (flying or sliding forward), the wait is the problem as mentioned above.
 

Jagan

New Member
Reaction score
30
I think it might be better off for you to study the Jump template available first. That is, of course provided that you have not.
 

Fluffball

Well-Known Member
Reaction score
35
condition: ability beeing cast equal to "yourability" ?

Yes, I know about that, I just wanted to get ability working first.

I think it might be better off for you to study the Jump template available first. That is, of course provided that you have not.

Yes, I have, if you are talking about Emiljr's Jump template, but I want to try and make this myself.

> what about the flying prob?

It was the wait. Flying and sliding are the same thing. It's just periodic movement on a particular axis. Either way (flying or sliding forward), the wait is the problem as mentioned above.

Ok, so that means that, if I can find a way to do this without the waits, then the flying will work?
 

vypur85

Hibernate
Reaction score
803
> if I can find a way

Yeah. Periodic timer or Repeating Timer. Anyway, flying already allows you change the rate and makes the flying movement smoothly. Why would you want to trigger the height again? Just change the rate accordingly to achieve what you want (unless you're talking about accelerating or decelerating flying then it must be triggered).
 

Fluffball

Well-Known Member
Reaction score
35
Yes, because I want it to have gravity, it will decellerate and accellerate respectively during the rising and falling, and i want it to jump to the point of the ability being cast, no point just jumping up and down.
 

Fluffball

Well-Known Member
Reaction score
35
Hmm, see whats wrong with this. When i use it, the testing unit moves to the middle-top of the map, i dont know why, heres the code:

Code:
Jump
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
    Actions
        Set JumpCaster = (Casting unit)
        Set TempPoint = (Target point of ability being cast)
        Set TempPoint2 = (Position of (Casting unit))
        Set Angle = ((Angle from TempPoint to TempPoint2) - 90.00)
        Set TempReal = (Distance between TempPoint and TempPoint2)
        Unit - Add Jump(CrowForm)  to (Casting unit)
        Unit - Set level of Jump(CrowForm)  for (Casting unit) to 1
        Unit - Order (Casting unit) to Night Elf Druid Of The Talon - Storm Crow Form
        Unit - Add classification of A flying unit to (Casting unit)
        Set Gravity = 1.00
        Countdown Timer - Start TempTimer as a Repeating timer that will expire in 0.01 seconds
        Wait 2.50 seconds
        Countdown Timer - Pause TempTimer
        Set Gravity = 1.00
        Countdown Timer - Start TempTimer2 as a Repeating timer that will expire in 0.01 seconds
        Wait 2.50 seconds
        Set Gravity = 1.00
        Countdown Timer - Pause TempTimer2
        Countdown Timer - Start TempTimer2 as a Repeating timer that will expire in 0.01 seconds
        Wait 2.50 seconds
        Countdown Timer - Pause TempTimer3

Code:
JumpTimer
    Events
        Time - TempTimer expires
    Conditions
    Actions
        Set TempPoint3 = (TempPoint2 offset by (TempReal / (250.00 x Gravity)) towards Angle degrees)
        Animation - Change JumpCaster flying height to ((Current flying height of JumpCaster) + (1.00 x Gravity)) at 99999.00
        Set Gravity = (Gravity - 0.04)
        Unit - Move JumpCaster instantly to TempPoint3
        Set TempPoint2 = (Position of JumpCaster)

This is done for the 3 timers

Hmm, i'll look into it more at home
 

vypur85

Hibernate
Reaction score
803
Code:
TempReal / (250.00 x Gravity

Code:
Gravity - 0.04

Say TempReal is 600 in distance. And at the 25th instance, the distance travelled would be:

600/(250 x 0.00) = Infinite

So, it would travel infinite distance before the values become negative.
 

Fluffball

Well-Known Member
Reaction score
35
Correct me if i'm wrong but 600 / 0 = 0. And 0 isn't infinite.

But, thanks, will look into it.
 

vypur85

Hibernate
Reaction score
803
> if i'm wrong

Wrong :p. It's infinite. How can you divide an apple into zero pieces? But you can divide zero apple into 10 pieces, but in the end, you get zero because there's no apple at all.


Apple/0 = Infinite

0/Apple = 0


Or just use another imagination....

1/1 = 1
1/0.1 = 10
1/0.001 = 1000
.
.
.
1/0.00000000000000000001 = ??

So the smaller the bottom value (forgot what's it called, denominator?), the bigger the number... if it's too small... then what's the value?
 

Sirroelivan

Gunnerkrigg Court
Reaction score
95
Correction: 600 / 0 isn't possible. However, 600 / x will aproach infinite if x approaches 0.
 

wellwish3r

wishes wells.
Reaction score
52
if you just want the units to rise and fall down again, couldn't you just set the flying height at a low speed, and then reduce it to zero at a high speed? Or did i miss something?
 

Fluffball

Well-Known Member
Reaction score
35
if you just want the units to rise and fall down again, couldn't you just set the flying height at a low speed, and then reduce it to zero at a high speed? Or did i miss something?
>I want the unit to rise, then fall, but at a decreasing and increasing rate.

As for the infinite stuff... thanks for the explanation... Will fix to .01 (Will this work, i can change the timers to a lower rate (.03 maybe?)
 

Cloak_Master

Active Member
Reaction score
41
I skimmed through that trigger, and I may be off the mark by alot (I'm pretty terrible at math-related activities) but I'd use a parabola arc and damn gravity.

Are you trying to accelerate the unit as it drops or something? That's like putting furniture in an ant farm.
 

Fluffball

Well-Known Member
Reaction score
35
Hmmm, maybe I will just totally redo it, since I probably didn't change some things that i should've
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top