Hey guys, can you help me with the timer, please?
My game requires: Start the timer when the question begins (not when flag clicked). In 50 seconds, the player needs to do as much questions as they can. After 50 seconds, the timer will stop then hide. The game displays score.
What I did: I make a variable named "time"> Reset timer> Set "time" to timer > Set time to 0 >
The problem is :
_ At the beginning of the game, I don't need the timer and it still shows up.
_ Don't know how to get the timer stop > No idea how to displays score after 50 seconds.
_ The timer doesn't hide when displays score.
Please help me, thank you :-)
Offline
I'd forget the timer entirely and use this:
[blocks]<when I receive[ question
<set{ time }to( 0
<repeat( 50
<change{ time }by( 1
<wait( 1 )secsc>
<end>[/blocks]
then do the score stuff here.
Last edited by ScratchReallyROCKS (2010-06-06 22:27:34)
Offline
I already get how to start the time. However, I couldn't get it stop after time to 50 seconds. Another problem is that I don't know how to HIDE it at the beginning of the game because it suppose to appears only when the player is answering questions TT PLEASE help [crying]
Offline
minadoan wrote:
I already get how to start the time. However, I couldn't get it stop after time to 50 seconds. Another problem is that I don't know how to HIDE it at the beginning of the game because it suppose to appears only when the player is answering questions TT PLEASE help [crying]
The timer has a few issues. It doesn't hide and it doesn't stop. Try making a variable and setting it to the timer in a Forever loop - then work with the variable instead. You can hide a variable and you can stop changing it's value:
[blocks]
<when green flag clicked>
hide variable Time <=== sorry there's no forum block for this command
<when I receive[ Show Answer Timer
<reset timer>
show variable Time <=== sorry there's no forum block for this command
<forever if> <( <timer> <<> 50 )
<set{ Time }to( <timer>
<end>
[/blocks]
That might do what you want. Be aware, though, that there is a bug in the online Java player with hidden variables. They need to be showing when the project is shared or they won't work right. So you might have to play some games with the Hide/Show scripts to make sure that happens.
Offline
Paddle2See wrote:
minadoan wrote:
I already get how to start the time. However, I couldn't get it stop after time to 50 seconds. Another problem is that I don't know how to HIDE it at the beginning of the game because it suppose to appears only when the player is answering questions TT PLEASE help [crying]
The timer has a few issues. It doesn't hide and it doesn't stop. Try making a variable and setting it to the timer in a Forever loop - then work with the variable instead. You can hide a variable and you can stop changing it's value:
[blocks]
<when green flag clicked>
hide variable Time <=== sorry there's no forum block for this command
<when I receive[ Show Answer Timer
<reset timer>
show variable Time <=== sorry there's no forum block for this command
<forever if> <( <timer> <<> 50 )
<set{ Time }to( <timer>
<end>
[/blocks]
That might do what you want. Be aware, though, that there is a bug in the online Java player with hidden variables. They need to be showing when the project is shared or they won't work right. So you might have to play some games with the Hide/Show scripts to make sure that happens.
*facepalm* he/she already MADE a variable named "timer"! He/she is trying to find how to hide his/her own variables, and helped with that.
Offline
What I did was : Reset timer > Set Time to timer > Set Time to 0 > Repeat until timer = 50 >>> Questions >>> next costume
@ Paddle to see: I try to put the "Forever If" after the questions and it doesn't work. I also try to put <the questions and set time to timer> INSIDE the "Forever If"..... and it still does not works. And I have no idea why :-(
Do you think there is another tool and can replace the timer??
Do anyone have any idea ???
Offline
minadoan wrote:
What I did was : Reset timer > Set Time to timer > Set Time to 0 > Repeat until timer = 50 > Questions > next costume
@ Paddle to see: I try to put the "Forever If" after the questions and it doesn't work. I also try to put <the questions and set time to timer> INSIDE the "Forever If"..... and it still does not works. And I have no idea why :-(
Do you think there is another tool and can replace the timer??
Do anyone have any idea ???
If you make a completely seperate script for the questions, the time variable should update itself properly - the issue now seems to be that the answers are stalling the update of the time variable.
Offline
Sorry for didn't tell you guys. Before the questions, I asks the player if they are ready to start now.
_ If they answer yes: next costume (explain the game) > start question
_ If no: switch the costume game over
If I seperate the questions into an individual script, then how can I start it on time ? I have tried like this: When I receive "yes" > start questions (and it doesn't work TT)
Offline