Discuss Scratch
- Discussion Forums
- » Suggestions
- » "Repeat for ___ secs" blocks
- TheAdriCoolManDude
-
1000+ posts
"Repeat for ___ secs" blocks
No Support. It would cause problems, like this:
repeat for (2) seconds {
wait (20) secs
} :: control
- ScratchDiogoh
-
1000+ posts
"Repeat for ___ secs" blocks
removed by ScatchDiogoh
Last edited by ScratchDiogoh (Sept. 11, 2018 19:16:08)
- Seam49
-
500+ posts
"Repeat for ___ secs" blocks
Support, the workaround hardly ever works, and putting wait 20 seconds won't run at all, plus, if the time runs out in the middle, It just will skip the last bits, or at the top, well skip the whole thing, why, there are no reliable workarounds, 

- SickBoi2000
-
5 posts
"Repeat for ___ secs" blocks
Support!
I saw the soultions but i would make a custom block out of it.
I saw the soultions but i would make a custom block out of it.
- PizzaAddict4Life
-
1000+ posts
"Repeat for ___ secs" blocks
(Removed by me)
Last edited by PizzaAddict4Life (July 8, 2020 18:23:50)
- MrFluffyPenguins
-
1000+ posts
"Repeat for ___ secs" blocks
i support, would be useful in so many ways
the workaround is annoying and unreliable
the workaround is annoying and unreliable
- SuperKamekArea
-
500+ posts
"Repeat for ___ secs" blocks
No support, you are just making a seconds version of the repeat block, you can tell others to avoid turbo mode and you can set this:
... :: hatAlso, isn't this rejected?
repeat (() * (30))
...
end
...
- MrFluffyPenguins
-
1000+ posts
"Repeat for ___ secs" blocks
That's the point. No support, you are just making a seconds version of the repeat block,
That doesn't work. you can set this:... :: hat
repeat (() * (30))
...
end
...
It isn't rejected. Also, isn't this rejected?
- DarthVader4Life
-
1000+ posts
"Repeat for ___ secs" blocks
I'm getting real sick and tired of people saying “No support, there's a workaround.” Very rarely does a block get removed because of a workaround. so rare in fact, that the only instance of a block getting removed because of a workaround that i am 100% sure happened is the forever if block. even then the extremely simple workaround wasn't the only factor, apparently users didn't understand it either. and because a block has a workaround DOESN'T mean it shouldn't be added. so if you could kindly read this, that'd be great.
- cooldude-222
-
100+ posts
"Repeat for ___ secs" blocks
Support!
I was about to suggest this! It would look like this:
I was about to suggest this! It would look like this:
repeat for (10) seconds {And work like this:
} ::control
set [time v] to (timer)
repeat until <(timer) > ((time) + [10])
Last edited by cooldude-222 (July 22, 2020 03:50:29)
- cooldude-222
-
100+ posts
"Repeat for ___ secs" blocks
If you have a very accurate fps variable you could do this:
reset timer
Repeat ((fps) * (# of seconds))
...
end
set [fps v] to (timer)
- AnAccount_StopAsking
-
500+ posts
"Repeat for ___ secs" blocks
Here's a workaround:
set [parameter v] to (timer)
repeat until <(timer) = ((parameter) + (. . .))>
. . .
end
- Maximouse
-
1000+ posts
"Repeat for ___ secs" blocks
This would just wait 20 seconds. Why no support because of one special case? No Support. It would cause problems, like this:repeat for (2) seconds {
wait (20) secs
} :: control
- HTML-Fan
-
1000+ posts
"Repeat for ___ secs" blocks
Well, I'm kinda not really sure. I think that it is similar to forever if: It's not completely clear what it does. You can find it out pretty easily, but it's not totally obvious that it's just a repeat until kinda thing, not that it stops executing when the time is over. So, I guess, overall rather no support.
- op1298
-
83 posts
"Repeat for ___ secs" blocks
You could just do:
reset timer
repeat until <(timer) = (...)>
...
end
Last edited by op1298 (July 26, 2020 04:15:43)
- awesome_guy6856
-
100+ posts
"Repeat for ___ secs" blocks
I agree with this idea. Although there is a workaround, it's a hassle to implement. Plus too many variables gets confusing and annoying to manage.
- HTML-Fan
-
1000+ posts
"Repeat for ___ secs" blocks
That workaround is way too easy. And, really, I don't know a single programming language with something so weird. Why can't you just check the time? And where would you use it?
- DarthVader4Life
-
1000+ posts
"Repeat for ___ secs" blocks
kindly read the post below. That workaround is way too easy. And, really, I don't know a single programming language with something so weird. Why can't you just check the time? And where would you use it?
has a workaround DOESN'T mean it shouldn't be added. so if you could kindly read this, that'd be great.and the ambiguity of the forever if is not replicated with this. I'm getting real sick and tired of people saying “No support, there's a workaround.” Very rarely does a block get removed because of a workaround. so rare in fact, that the only instance of a block getting removed because of a workaround that i am 100% sure happened is the forever if block. even then the extremely simple workaround wasn't the only factor, apparently users didn't understand it either. and because a block
repeat for (10) seconds {
wait (20) secs
} ::control
would wait 20 secs.
repeat for (60) seconds {would repeat everything in there until 60 secs has passed. if the script execution time exceeds 60 secs, the script inside would only run once.
...
} ::control
Last edited by DarthVader4Life (July 26, 2020 13:46:31)
- op1298
-
83 posts
"Repeat for ___ secs" blocks
I need this suggested block for one of my projects!
reset timer
repeat until <(timer) = [The amount of time it should repeat.]>
...
end
Last edited by op1298 (July 26, 2020 17:06:30)
- Discussion Forums
- » Suggestions
-
» "Repeat for ___ secs" blocks