Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Timer problem
- Sommerlund
- New to Scratch
12 posts
Timer problem
Hello there.
As you can see on the picture. when touching sprite 3, timer is going to +5. and this works fine. but when touching sprite 3 again fast before it runs down to 0. then it dosen't add +5 when the buttom box is on.
What to do? what would you do?
As you can see on the picture. when touching sprite 3, timer is going to +5. and this works fine. but when touching sprite 3 again fast before it runs down to 0. then it dosen't add +5 when the buttom box is on.
What to do? what would you do?
- UniMog
- Scratcher
58 posts
Timer problem
Hi Sommerlund
The “wait 1 secs” might be the problem: Try removing it and change the “5” to “500”.
The “wait 1 secs” might be the problem: Try removing it and change the “5” to “500”.
- Sommerlund
- New to Scratch
12 posts
Timer problem
Hi Sommerlund
The “wait 1 secs” might be the problem: Try removing it and change the “5” to “500”.
After removing “wait 1 secs” it works, and adds 5. as you probably know, the timer is running -1 really fast. so thats why you tell me to put 500 insted of 5. the problem is just that, it runs too slow
How about i show it to you on Skype?
You can add me with Pazzer2
- Sommerlund
- New to Scratch
12 posts
Timer problem
I think i got it setting the 5 to 150 works as 5 secs so there it is! alittle wrong and confusing solution i think. but it works.
Last edited by Sommerlund (Feb. 24, 2014 21:35:55)
- UniMog
- Scratcher
58 posts
Timer problem
Nice one Sommerlund.
You could experiment with small delays (0.1 or 0.01). I sometimes find them helpful.
I do worry about just counting with numbers for delays though. Maybe someone with more Scratch experience than me could answer… Do Scratch programs run faster or slower depending on the user's machine ? I guess they must to some extent, but has any attempt been made inside the Scratch engine to “control” the speed of execution, or control the display refresh rate ?
One computer might have a count of 150 to achieve a 5 second delay, others might need 250 or 75.
If you need a genuine 5 second delay before something is allowed to happen, then I would suggest you use the timer block.
Take a look at http://scratch.mit.edu/projects/18367646/ to see if this would be better for your program.
You could experiment with small delays (0.1 or 0.01). I sometimes find them helpful.
I do worry about just counting with numbers for delays though. Maybe someone with more Scratch experience than me could answer… Do Scratch programs run faster or slower depending on the user's machine ? I guess they must to some extent, but has any attempt been made inside the Scratch engine to “control” the speed of execution, or control the display refresh rate ?
One computer might have a count of 150 to achieve a 5 second delay, others might need 250 or 75.
If you need a genuine 5 second delay before something is allowed to happen, then I would suggest you use the timer block.
Take a look at http://scratch.mit.edu/projects/18367646/ to see if this would be better for your program.
- Sommerlund
- New to Scratch
12 posts
Timer problem
Nice one Sommerlund.
You could experiment with small delays (0.1 or 0.01). I sometimes find them helpful.
I do worry about just counting with numbers for delays though. Maybe someone with more Scratch experience than me could answer… Do Scratch programs run faster or slower depending on the user's machine ? I guess they must to some extent, but has any attempt been made inside the Scratch engine to “control” the speed of execution, or control the display refresh rate ?
One computer might have a count of 150 to achieve a 5 second delay, others might need 250 or 75.
If you need a genuine 5 second delay before something is allowed to happen, then I would suggest you use the timer block.
Take a look at http://scratch.mit.edu/projects/18367646/ to see if this would be better for your program.
Well. if i got time tomorrow, i will try and run my game on a crappy computer, and see if the timer is running slower.
- MasterCard786
- Scratcher
100+ posts
Timer problem
Hello there.
As you can see on the picture. when touching sprite 3, timer is going to +5. and this works fine. but when touching sprite 3 again fast before it runs down to 0. then it dosen't add +5 when the buttom box is on.
What to do? what would you do?
Dont use
<[] = []>
Use
<[] < []>
Check these: APEX NEWS ISSUE 2 - http://scratch.mit.edu/projects/20648596/
And the amazing square - http://scratch.mit.edu/projects/20741133/
- codingyeetingking
- New to Scratch
1 post
Timer problem
in my scratch project the timer for the maze is not working an intended
once the the you reach level 2 and 3 the timer's go down by 2 seconds and it combines with the coding for level 1 timer.
once the the you reach level 2 and 3 the timer's go down by 2 seconds and it combines with the coding for level 1 timer.
- Harakou
- Scratcher
1000+ posts
Timer problem
Please make a new thread for this question - this thread is very old and doesn't seem to be about the same exact thing. You'll get much better answers with a new one. in my scratch project the timer for the maze is not working an intended
once the the you reach level 2 and 3 the timer's go down by 2 seconds and it combines with the coding for level 1 timer.
- Discussion Forums
- » Help with Scripts
- » Timer problem