# How do I increased speed everytime a certain variable reached?

0 favourites
• 5 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
• Hey I need a help to make increased speed of bullet everytime this certain of variable is reached. The logic is probably like this : every multiple of 2000 variable (ex : 2000,4000,6000), the bullet speed increased by 50 (it's start with 100 and when I reach 2000 the bullet's speed would be increased to 150. And when I reach 4000 the bullet's speed would be increased to 200 ). I'm sorry for my bad english. I hope someone would understand it and help me with it.

#### Tagged:

• Set bullet speed to 100+int(variable/2000)*50

• Set bullet speed to 100+int(variable/2000)*50

thank you, It works. If I can bother you more, can you explain it to me? How the script worked know when to added speed for every 2000 ? (0 skill at programming)

• int() expression means integer, it removes everything after decimal point.

For example:

int(3.14)=3

int(5210/2000)=2

• ## Try Construct 3

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

Construct 3 users don't see these ads
• int() expression means integer, it removes everything after decimal point.

For example:

int(3.14)=3

int(5210/2000)=2