I am making a game similar to jet pack joyride and I need the background to progressively get faster and faster I also need to know how I can make it get slower. Thanks a ton!
Presumably you have something like this at the moment:
myBackground.x = myBackground.x - 1
or something similar to move the background continuously.
To change the speed, just use another variable and change it’s value.
local speed = 1 local function enterFrame(event) myBackground.x = myBackground.x - speed speed = speed \* 1.00000001 --speeds up slightly --or speed = speed \* 0.99999999 --slows down slightly end
Presumably you have something like this at the moment:
myBackground.x = myBackground.x - 1
or something similar to move the background continuously.
To change the speed, just use another variable and change it’s value.
local speed = 1 local function enterFrame(event) myBackground.x = myBackground.x - speed speed = speed \* 1.00000001 --speeds up slightly --or speed = speed \* 0.99999999 --slows down slightly end