Increase speed of actors with score/round
Adrenaline
Member Posts: 523
Hi all,
In my game, I want the speed of an actor to increase every time the player scores 10 points.
How do I go about updating the speed of the actor only when the player scores 10, 20, 30, etc? I don't want there to be a limit, it should be able to go on forever (or until the player loses).
The actor has a Speed atribute, and the game has a Speed Modifier attribute.
I have a rule that changes the velocity of the actor's speed to self.Speed * game.Speed Modifier
Question 1) How do I allow for the Speed Modifier to increase every 10 points, with no end in sight?
Question 2) How do I get the actor to update it's velocity? It doesn't seem to be reacting to the changes in Speed Modifier. However, if I spawn a new actor after the Speed Modifier has changed, I notice the velocity difference. I just can't get the current actors to update their velocity after they spawn.
Thanks!
In my game, I want the speed of an actor to increase every time the player scores 10 points.
How do I go about updating the speed of the actor only when the player scores 10, 20, 30, etc? I don't want there to be a limit, it should be able to go on forever (or until the player loses).
The actor has a Speed atribute, and the game has a Speed Modifier attribute.
I have a rule that changes the velocity of the actor's speed to self.Speed * game.Speed Modifier
Question 1) How do I allow for the Speed Modifier to increase every 10 points, with no end in sight?
Question 2) How do I get the actor to update it's velocity? It doesn't seem to be reacting to the changes in Speed Modifier. However, if I spawn a new actor after the Speed Modifier has changed, I notice the velocity difference. I just can't get the current actors to update their velocity after they spawn.
Thanks!
Comments
If anyone knows anything about this, please chime in.
Thanks!
Then have a rule that says when the current score = ['LastRecordedScore'+10] then change 'LastRecordedScore' to the current score and increase the value of the speed modifier - eg: change speed modifier to speed modifier + 1
(strip out the unimportant scenes/parts/actors/image if you don't want people to see what you're working on).