I need to make a boost in the score when the sprite manages to eat three items in a row. There will be a boost in the score by about 3 points. Is there anyone here that knows how to do this? Thanks
Offline
Have a varibale called score and a variable called row. Have score visible. Set row to 0. If the character eats 1 item set row to 1, if they eat another set it to 2 and another, 3. But if there is much of a time difference between eating them set it to 0 again. Then have a script that says, when row = 3 change score by 3 then wait until row doesn't equal 3 (so that it doesn't just continue adding three. If this helps then good, else say and I'll try and make a project with it in so that you can download it.
Offline
Don't use set for row, just change it every time something is eaten. Then when row equals three, set row to zero and change score by 3.
Offline
gracielace wrote:
I need to make a boost in the score when the sprite manages to eat three items in a row. There will be a boost in the score by about 3 points. Is there anyone here that knows how to do this? Thanks
There's something called the "mod" block. It looks like this:
(( ) mod ( ))Using a variable called "score", Make this:
forever if <((score) mod (0)) = (0)> change [score] by (1) wait until <not <((score) mod (0)) = (0)>> end
Last edited by Sky01 (2013-03-09 22:45:45)
Offline
Thanks for your help
Offline