Discuss Scratch

TheAdriCoolManDude
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

No Support. It would cause problems, like this:

repeat for (2) seconds { 
wait (20) secs
} :: control
ScratchDiogoh
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

removed by ScatchDiogoh

Last edited by ScratchDiogoh (Sept. 11, 2018 19:16:08)

Seam49
Scratcher
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
New Scratcher
5 posts

"Repeat for ___ secs" blocks

Support!
I saw the soultions but i would make a custom block out of it.
PizzaAddict4Life
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

(Removed by me)

Last edited by PizzaAddict4Life (July 8, 2020 18:23:50)

MrFluffyPenguins
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

i support, would be useful in so many ways

the workaround is annoying and unreliable
SuperKamekArea
Scratcher
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:
... :: hat
repeat (() * (30))
...
end
...
Also, isn't this rejected?
MrFluffyPenguins
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

SuperKamekArea wrote:

No support, you are just making a seconds version of the repeat block,
That's the point.

SuperKamekArea wrote:

you can set this:
... :: hat
repeat (() * (30))
...
end
...
That doesn't work.

SuperKamekArea wrote:

Also, isn't this rejected?
It isn't rejected.
DarthVader4Life
Scratcher
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
Scratcher
100+ posts

"Repeat for ___ secs" blocks

Support!
I was about to suggest this! It would look like this:
repeat for (10) seconds { 

} ::control
And work like this:
set [time v] to (timer)
repeat until <(timer) > ((time) + [10])

Last edited by cooldude-222 (July 22, 2020 03:50:29)

cooldude-222
Scratcher
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
Scratcher
500+ posts

"Repeat for ___ secs" blocks

Here's a workaround:

set [parameter v] to (timer)
repeat until <(timer) = ((parameter) + (. . .))>
. . .
end
Maximouse
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

TheAdriCoolManDude wrote:

No Support. It would cause problems, like this:

repeat for (2) seconds { 
wait (20) secs
} :: control
This would just wait 20 seconds. Why no support because of one special case?
-InsanityPlays-
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

HTML-Fan
Scratcher
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
Scratcher
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
Scratcher
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
Scratcher
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
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

HTML-Fan wrote:

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?
kindly read the post below.

DarthVader4Life wrote:

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.
and the ambiguity of the forever if is not replicated with this.
repeat for (10) seconds { 
wait (20) secs
} ::control

would wait 20 secs.

repeat for (60) seconds { 
...
} ::control
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.

Last edited by DarthVader4Life (July 26, 2020 13:46:31)

op1298
Scratcher
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)

Powered by DjangoBB