Discuss Scratch

anguz110
Scratcher
46 posts

"Repeat for ___ secs" blocks

Jfc this thread is almost 4 years old and it's been answered already, stop necrobumping
stickfiregames
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

anguz110 wrote:

Jfc this thread is almost 4 years old and it's been answered already, stop necrobumping
You're allowed to post on old suggestions if they haven't been implemented or rejected.

Anyway this block is ambiguous. If the time runs out halfway through the loop, would it cut off immediately or carry on to the end of the loop? The first might be more expected but it means you can't guarantee that every block in the loop will run the same number of times. The second would be more like the repeat until block.
Austinato
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

Bumping.
tali1665
Scratcher
100+ posts

"Repeat for ___ secs" blocks

Support!
repeat for (1) secs::control
Smurphy13AWESOME
Scratcher
500+ posts

"Repeat for ___ secs" blocks

Sorry, no support. ST wants to make Scratch learning, only the essentials. Not to make it really easy. Good idea, but any block that's not adding a new thing, just making it easier shouldn't be added.
Auroura_Wolf
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

Read the stickies. This has already been suggested, and already has a workaround. Now I suggest you close this topic
anguz110
Scratcher
46 posts

"Repeat for ___ secs" blocks

This thread is, like, 3 years old.
_-Unity-_
Scratcher
11 posts

"Repeat for ___ secs" blocks

anguz110 wrote:

I think there should be repeat blocks that don't repeat a given number of times, but for a given number of seconds.

How it works is, there's a repeat block like this:

repeat (for ___ seconds?)

end

Then you enter how many seconds you want it to repeat.

Please give feedback

that's nice. sometimes we need to control our timing and this is what we need… Nice one!
cul8er
Scratcher
500+ posts

"Repeat for ___ secs" blocks

Auroura_Wolf wrote:

Read the stickies. This has already been suggested, and already has a workaround. Now I suggest you close this topic
???
Where has it already been suggested? Which sticky?
As mentioned, there's a workaround and some ambiguity as to how it would work.
No support.
Sheep_maker
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

Auroura_Wolf wrote:

Read the stickies. This has already been suggested, and already has a workaround. Now I suggest you close this topic
This is the oldest repeat for _ secs block suggestion; this topic was probably posted on because their topic was closed for being a duplicate of this topic.
Pixar2000
Scratcher
100+ posts

"Repeat for ___ secs" blocks

_-Unity-_ wrote:

anguz110 wrote:

I think there should be repeat blocks that don't repeat a given number of times, but for a given number of seconds.

How it works is, there's a repeat block like this:

repeat (for ___ seconds?)

end

Then you enter how many seconds you want it to repeat.

Please give feedback

that's nice. sometimes we need to control our timing and this is what we need… Nice one!
No. More like this.
repeat for (1) secs{
}::control
Charles12310
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

No Support. What if you are putting a script it the repeat seconds block and that one script takes more time than the amount of seconds you want? And if it does complete and the seconds are up, will it repeat again? No, it would repeat only once, since those seconds are up, and the script is done. Besides, what would happen to the script while the seconds are gone? Will they continue, or stop?

However, here is a good workaround:

reset timer
repeat until <(timer) = (amount of seconds you want)>
... // Do Your Stuff Here
end
PkmnQ
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

anguz110 wrote:

I think there should be repeat blocks that don't repeat a given number of times, but for a given number of seconds.

How it works is, there's a repeat block like this:

repeat for () seconds{
. . .
} :: control

Then you enter how many seconds you want it to repeat.

Please give feedback

Fixed, and here's a workaround.
set [timer+ v] to ((timer) + (. . .))
repeat until <(timer) = (timer+)>
. . .
end

Last edited by PkmnQ (July 22, 2017 14:01:11)

LionHeart70
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

Semi support.. But there's a workaround. I could use this for an animation, though.
FancyFoxy
Scratcher
500+ posts

"Repeat for ___ secs" blocks

I'd say I'd support this, as I would've needed this block for my animations and I'd assume, my games.
I'd is my favorite word now
Botcho_Otkho
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

removed by me because at this time i was kinda dumb

Last edited by Botcho_Otkho (July 22, 2020 11:14:49)

Charles12310
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

Botcho_Otkho wrote:

Rejected from the sticky.
It isn't rejected. There is nothing in the sticky. It's just that this block is complicated.
walkcycle
Scratcher
500+ posts

"Repeat for ___ secs" blocks

PkmnQ wrote:

Fixed, and here's a workaround.
set [timer+ v] to ((timer) + (. . .))
repeat until <(timer) = (timer+)>
. . .
end
That's a better workaround since the timer doesn't have to be reset.

Change the Boolean to

<(timer) > (timer+)> // greater than 

so the loop is exited for sure.
Charles12310
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

set [timer1 v] to ((timer) + (# of seconds))
repeat until <not <(timer) < (# of seconds)>>
...
end

What do you mean, exited? The timer doesn't have to be more than the amount of seconds otherwise it would repeat for the amount more than we want.
HappyMohid
Scratcher
73 posts

"Repeat for ___ secs" blocks

repeat <[] < []>

end

in scratch wiki

Powered by DjangoBB