How do I Increase speed of an object over time?

0 favourites
  • 3 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Hey Devs,

    I am curious on how you would increase bullets speed if score is = 5?

    ex: if score = 5 then increase bullet speed to 500

    Not only am I curious as to that but how would I increase the bullet speed for every +5 scored?

    ex: for every 5 score increase bullet speed by 100

    I know the basics but when it comes to continuously increasing by increments I get super lost.

    Any help would be great!

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For the first question it's pretty simple, just add a condition to check for when the score is 5 then add an action to set the bullet speed to 500.

    For adding 100 to the speed every 5 seconds you could make an every tick event with an action to set the speed with the expression:

    int(score/5)*100+initial_speed

    Where initial_speed is whatever the bullet speed started at, or rather what speed you want it to start at.

  • For the first question it's pretty simple, just add a condition to check for when the score is 5 then add an action to set the bullet speed to 500.

    For adding 100 to the speed every 5 seconds you could make an every tick event with an action to set the speed with the expression:

    int(score/5)*100+initial_speed

    Where initial_speed is whatever the bullet speed started at, or rather what speed you want it to start at.

    That worked and it helped me with a few more of my other questions....

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