# How do I Increase speed of an object over time?

Get help using Construct 2

### » Mon Jul 07, 2014 3:28 pm

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!
B
15
S
3
G
1
Posts: 7
Reputation: 1,547

### » Mon Jul 07, 2014 4:52 pm

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.
B
100
S
38
G
134
Posts: 5,550
Reputation: 85,313

### » Mon Jul 07, 2014 5:11 pm

R0J0hound wrote: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....
B
15
S
3
G
1
Posts: 7
Reputation: 1,547