Discuss Scratch
- Discussion Forums
- » Suggestions
- » Repeat for X Seconds Block
- awesome5185
-
Scratcher
1000+ posts
Repeat for X Seconds Block
Well I'd like to ask what happens if it's halfway through running through a long block, like Say “hi” for 50 seconds or a long custom block? Or just halfway through a script?
- cul8er
-
Scratcher
500+ posts
Repeat for X Seconds Block
Lol, 3 pages of posts and everyone missed this duplicate.
- SumitraKan
-
Scratcher
44 posts
Repeat for X Seconds Block
Hi, I have an issue where I did not put any “repeat” block yet the programme keep rewinding and repeatedly play the sound. This is the issue:
1. When I received “Sebut-almari”, play sound “almari” till done.
2. When I recieved “Sebut-katil”, play sound “katil” till done.
I have tried to transfer the script to different sprite, use “broadcast ()” instead of “broadcast () and wait”, “play sound” instead of “play sound till done”. The scripts just repeat themselves.
Can any one please help me with this?
This is the link to my project:
https://scratch.mit.edu/projects/221640578/
1. When I received “Sebut-almari”, play sound “almari” till done.
2. When I recieved “Sebut-katil”, play sound “katil” till done.
I have tried to transfer the script to different sprite, use “broadcast ()” instead of “broadcast () and wait”, “play sound” instead of “play sound till done”. The scripts just repeat themselves.
Can any one please help me with this?
This is the link to my project:
https://scratch.mit.edu/projects/221640578/
Last edited by SumitraKan (May 9, 2018 06:16:39)
- KJRYoshi07
-
Scratcher
1000+ posts
Repeat for X Seconds Block
Hi, I have an issue where I did not put any “repeat” block yet the programme keep rewinding and repeatedly play the sound. This is the issue:Please don't put this in a suggestion, put it in help with scripts.
1. When I received “Sebut-almari”, play sound “almari” till done.
2. When I recieved “Sebut-katil”, play sound “katil” till done.
I have tried to transfer the script to different sprite, use “broadcast ()” instead of “broadcast () and wait”, “play sound” instead of “play sound till done”. The scripts just repeat themselves.
Can any one please help me with this?
This is the link to my project:
https://scratch.mit.edu/projects/221640578/
Last edited by KJRYoshi07 (May 9, 2018 08:24:04)
- StrangeMagic32
-
Scratcher
1000+ posts
Repeat for X Seconds Block
This is an interesting idea, but I remember seeing somewhere a blaring issue with this.
How would that work?
No Support.
repeat for (1) secs{
wait (2) secs
}::controlHow would that work?
No Support.
Last edited by StrangeMagic32 (Dec. 27, 2018 21:15:57)
- Sheep_maker
-
Scratcher
1000+ posts
Repeat for X Seconds Block
This is an interesting idea, but I remember seeing somewhere a blaring issue with this.It's a bit silly to no support based on a lack of knowledge.repeat for (1) secs{
wait (2) secs
}::control
How would that work?
No Support.
Quite sure it would finish the current loop before stopping, so the block would take 2 seconds (despite specifying one).
- TheBurger82
-
Scratcher
100+ posts
Repeat for X Seconds Block
Support!
Last edited by TheBurger82 (Dec. 28, 2018 02:46:09)
- SuperKamekArea
-
Scratcher
500+ posts
Repeat for X Seconds Block
How I would have it looking like is:
repeat for () seconds{
} :: control- BasisEssence779
-
Scratcher
100+ posts
Repeat for X Seconds Block
This idea is useless. You can use the block repeat 30 times for a second. (A seconde = 30 tick)
- furrypig
-
Scratcher
100+ posts
Repeat for X Seconds Block
This idea is useless. You can use the block repeat 30 times for a second. (A seconde = 30 tick)That is unexact. Scratch runs at different speeds usually, not the exact same speed at all times. It may run 29 frames in one second and then 27 then 30, so it's not an exact amount of time. And with lag it will run a lot more slowly—if it is lagging to only 15-20 frames per second, then it will repeat for almost 2x too long.
- super_epic_games
-
Scratcher
43 posts
Repeat for X Seconds Block
no offence, but it is kinda easy.
here's the code:
here's the code:
reset timeralso, change “200” to whatever you want.
repeat until <(timer) = [200]>
say [your code here]
end
Last edited by super_epic_games (Jan. 12, 2020 07:23:50)
- WindOctahedron
-
Scratcher
1000+ posts
Repeat for X Seconds Block
no offence, but it is kinda easy.But what if you run one of these, and before it finishes, run another? It wouldn't work like you intended it to.
here's the code:reset timeralso, change “200” to whatever you want.
repeat until <(timer) = [200]>
say [your code here]
end
- Seth_Zaw
-
Scratcher
100+ posts
Repeat for X Seconds Block
No support. There's a workaround for it.
reset timer
repeat until <(timer) > (x)>
if <not <(timer) > (x)>> then
...
end
end
- GoldBackthewebAlext
-
Scratcher
100+ posts
Repeat for X Seconds Block
Lol, 3 pages of posts and everyone missed this duplicate.Right lol.
I support this idea! All the workarounds have some issues, this is a purrrfect solution.

- PizzaAddict4Life
-
Scratcher
1000+ posts
Repeat for X Seconds Block
Lol, 3 pages of posts and everyone missed this duplicate.
Yes, this is a duplicate. Please use that above link to continue this conversation. Reporting for close
Last edited by PizzaAddict4Life (May 14, 2020 18:19:59)
- Paddle2See
-
Scratch Team
1000+ posts
Repeat for X Seconds Block
Lol, 3 pages of posts and everyone missed this duplicate.Thanks for the link! It does look like this is a duplicate topic so I'll close it to keep the conversation all in one place.
Please use the existing topic in the link above.
- Discussion Forums
- » Suggestions
-
» Repeat for X Seconds Block















