reduce bullet speed over time

0 favourites
  • 15 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • I already posted this topic but unfortunately no answers, So sorry for re-posting.

    But i basically want to slow down a object thats using the bullet behavior over time, I think i need to use lerp() But im unsure how to use this :(

    Any santa's little helpers around? :)

    Thanks.

  • it depends on what exactly you want to do, but you can just set bulletspeed to speed var, and just substract from speedvar every ..seconds

  • vtrix, When the players y is greater than a certain number then i want the bullet speed to reduce to 0 but smoothly,

    I tried to set a variable :

    minSpeed = 0

    then when players y is greater than the number i chose, lerp(Player.speed,minSpeed,0.8) But it didnt work :(

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • isnt it like this, will need to check :)

    lerp(Player.speed,minSpeed,0.8*dt)

    yes this should work ?

  • How is your event exactly ?

  • Oh yeah, but its still not working.

    Im setting the players current speed to 400 every tick, So it doesnt work :(

  • kiyoshi, Every tick i set the players speed to a global varaible 'Speed'

    When its y position is greater than a target(have not decided yet) then i need its speed to slow down..

  • yes that will not work, just set the current speed once, otherwise it will overwrite the slowdown

    just to this lerp(speed,0,0.8*td)

  • Hmm Thanks, Basically I think im approaching this wrong.

    I need to be able to set the bullets speed to slow down once it hits that y position then replicate physics and speed up again. I know the bullet object has a built in physics property but i cannot use it in this case the controls are a little to complicated.

    So a little breakdown:

    Players y > (TargetY) - Slowdown Bullet object,

    Players Y < (TargetY) Increase speed back to normal.

    Take a look at this game,

    youtube.com/watch

    Its been quite popular on this forum, But it shows what im trying to achieve quite well, If the players y > than a certain y then it slows down and feels heavy.. Unless it hits a booster..

  • whaleRip.capx

    (you really want to make the same game? just buy it and play it )

  • I would buy it but i dont own a IOS device.

    And im not making exactly the same game, You'll see when its complete, It has some of the same features and many more :)+ its a racing game :)

    But i truly do love the game! I play it on my friends IPad all the time.

  • yeah yann maybe you can make the whaleplugin :)

  • It would be cool if someone made a behavior to be like that :O!!

  • I have other plugins in mind... (:

  • O_o...

    Just set the bullet's acceleration property to a negative value, and it will slow down over time.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)