Endless Runner - How to make the distance value increase at a faster rate as the game goes on?
Slayre77
Member, PRO Posts: 115
HI, Im working on a runner game. I want to make it seem as if everything is moving faster as the player progresses further. However, I cant figure out a way to make the distance value (integer) to increase faster . Any help would be appreciated. Ty
Comments
You want a way to make a value 'increase faster' ?
So basically you want the rate - that something is changing - to speed up ?
You could try multiplying the value by game.time.
So you're just wanting to change the rate of increase for an attribute called game.distance?
You could create a real attribute called game.distanceMultiplier and set it to 1. Then have a timer:
Timer every 5 seconds
Change attribute game.distanceMultiplier to game.distanceMultiplier+0.1
To display the distance:
Display Text game.distance*game.distanceMultiplier
So after 5 seconds, the distance multiplier would be 1.1; after 10 seconds it would be 1.2; etc. If the distance is increasing steadily, then this would ramp up the speed every 5 seconds.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User