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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top