I've made this game called Steady Hand and I have put it on the website but I want to make a better version including a time limit. How do I put it so that it has to touch a sprite in a certain amount of time?
Offline
Nice game!
Try using the Timer from the Sensing commands:
When Green Flag Clicked - Reset Timer (you need to do this for each level too)
When testing if touching Sprite3 include a test:
if Timer < 45
Broadcast Win
Else
Broadcast Lost
Instead of 45 make a variable and reduce the value for each level.
Offline
When I press the Green Flag it only has the white outline for a second and dosen't work!
Offline
donkeyscommand wrote:
When I press the Green Flag it only has the white outline for a second and dosen't work!
You should not need to change anything so that it stops working. Just add the timer bits.
This is the general idea - although this will not reset for each level etc, etc.
Offline
Thanks but how do you see the timer because I'm not sure it works.
Offline
Never mind I think what I'll do is I'll do a number coundown changing "costumes" each second and when I recieve lose return to beggining.
Is that right?
Offline
Does anyone know how to add the score on a game, so that when the shark eats the fish, points are added, but when the shark eats the sunglasses, the time resets and the game is over? please help!
Offline
make a variable for all sprites called "score"
have a big game over sprite
when green flag clicked
hide
set score to 0
when I receive eat_fish
change score by 1
when I receive eat_sunglasses
show
move to front
stop all
Offline
put this in a random sprite....[blocks]<when green flag clicked><set{ time }to( 50<forever><change{ time }by( 1<(<if><( <{time }> <=>0 )><wait1secsc><stop all>[/blocks]
Offline
put this in a sprite....[blocks]( <when green flag clicked><set{time }to( 50(<forever><change{time }by( -1<if><{( time <=> 0 )<stop all>) [/blocks]
Hope that helps.
Offline
17640 wrote:
how do you make it so that after a certain amount of time the game stops?????
When the green flag is clicked, you make the game reset the timer. Make it so when the timer equals a certain amount, it stops all.
If this doesn't work, use a variable instead.
Offline
Jonathanpb wrote:
17640 wrote:
how do you make it so that after a certain amount of time the game stops?????
When the green flag is clicked, you make the game reset the timer. Make it so when the timer equals a certain amount, it stops all.
If this doesn't work, use a variable instead.
Better yet, make it so that when the timer is GREATER than a given amount, it stops all. It's not a good idea to try to test on an exact comparison of a floating point number (number with a decimal place in it). The internal representation of the number doesn't always line up with what you see on the variable display and the match might not happen.
Offline
Paddle2See wrote:
Jonathanpb wrote:
17640 wrote:
how do you make it so that after a certain amount of time the game stops?????
When the green flag is clicked, you make the game reset the timer. Make it so when the timer equals a certain amount, it stops all.
If this doesn't work, use a variable instead.Better yet, make it so that when the timer is GREATER than a given amount, it stops all. It's not a good idea to try to test on an exact comparison of a floating point number (number with a decimal place in it). The internal representation of the number doesn't always line up with what you see on the variable display and the match might not happen.
Ooh! I remember now... Scrach doesn't seem to sense quick things like using the equal sign. Using the greater sign would work better.
I'm replying to your post from over two months ago!
Offline
I've make a time limit for mario game, <when green flag clicked> <forever><wait( 1 )secsc><change{ timer }by( -1 ) this is for 1 second, okay?
Offline