I am creating a park your car game. I want the score system to be based on the amount of time it took for the user to complete the level. The user only has 20 seconds to complete each level. When the user has completed the level I have a broadcast that makes a "next level?" text appear and I have their score appear. When the level ends the time variable continues counting down and this changes their score. How do I make it so when the "level 1 done" message broadcasts, it forces the time variable to stop?
Offline
well if your script is like this
when gf clicked forever wait [1] secs change [timer v] by [1]then you should set it to this.
when gf clicked set [should I stop timer? v] to [0]
When I receive [level 1 done v] set [should I stop timer? v] to [1]Now, you should change the very first script to this
when gf clicked forever repeat [10] wait [0.1] secs change [timer v] by [0.1] if <<should I stop timer?>=[1]> wait until <not<<should I stop timer?>=[1]>> end endYou should also put
when I receive [new level beginning v] set [should I stop timer? v] to [0]That should fix it. Hope this helps.
Offline
No problem!
Offline