change the speed of the spawn actor after 10 secound
shonasen
Member Posts: 40
hi can some one help with the speed of spawn actor after 10 sec.my game is related to the balloon moving in air .i want my balloons to move in some x speed for first 10 sec and later i want that speed to change speed x+20 for every 10 sec.
Comments
Make a global variable (game.speed).
Then make an actor somewhere that is in the scene from the beginning, but off the screen or not visible.
Inside that actor, make a rule, every 10 seconds increase game.speed to game.speed+10
Then in your balloon actors, make their speed based of game.speed
Make your speed:
x+floor( self.Time /10)*20
. . . .
With the above expression the speed value will jump up by 20 every 10 seconds, but if you want the speed to gradually change over time, so that the cumulative result is an increase of 20 every 10 seconds, then use this:
x+( self.Time *2)
thanks @socks and @jsorr2.