1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Solved] Parabolic movement

Discussion in 'World Editor Help Zone' started by HerlySQR, Nov 5, 2020.

Tags:
  1. HerlySQR

    HerlySQR

    Joined:
    Jun 26, 2020
    Messages:
    725
    Resources:
    0
    Resources:
    0
    Can you tell me how can I make a unit go up and then down (the unit is already a flying unit) and the trajectory was a parabola?
     
  2. HerlySQR

    HerlySQR

    Joined:
    Jun 26, 2020
    Messages:
    725
    Resources:
    0
    Resources:
    0
  3. pr114

    pr114

    Joined:
    Mar 26, 2017
    Messages:
    261
    Resources:
    0
    Resources:
    0
    You add a base speed, and each time interval that base speed is reduced.

    See this example. f means the flying height and t is the time that has passed.
    I use time intervals of .03 sec for a smooth visual.

    Meaning the first .03 time interval the flying height is boosted by 90, next interval +84 etc.

    Code (Lua):
    f = f+90-(t*6)
    SetUnitFlyHeight(u, f, 9999)
     
  4. HerlySQR

    HerlySQR

    Joined:
    Jun 26, 2020
    Messages:
    725
    Resources:
    0
    Resources:
    0
    Ok, but I also wanna the height depends of the horizontal distance the unit will travel.
     
  5. DoomBlade

    DoomBlade

    Joined:
    Feb 5, 2018
    Messages:
    380
    Resources:
    0
    Resources:
    0
    There are at least hundred jump spells and/or systems in the spells section. :)
     
  6. HerlySQR

    HerlySQR

    Joined:
    Jun 26, 2020
    Messages:
    725
    Resources:
    0
    Resources:
    0
    Yes, you are right, but I have a problem, my unit when lands it has to be removed in that exact moment and do some actions, so How can I detect if the trigger that moves finish its work?, Using a confirmer no because that removes the unit before the periodic trigger ends, or Am I doing something wrong?
     
  7. HerlySQR

    HerlySQR

    Joined:
    Jun 26, 2020
    Messages:
    725
    Resources:
    0
    Resources:
    0