Discuss Scratch

anguz110
Scratcher
46 posts

"Repeat for ___ secs" blocks

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


Ample parking day or night, people spouting HOWDY NEIGHBOR!
jh1234l
Scratcher
100+ posts

"Repeat for ___ secs" blocks

It can be worked around:
repeat until <(timer) = [?]>

move () steps
end
Or you can use a variable, if you have another spite that uses the timer.

Last edited by jh1234l (Nov. 21, 2013 05:02:59)


Two Advertising and sharing groups:
Scratch Cat's Hideout: Home Page / Advertise! / Members / Write A Review / Read A Review / FAQs
Scratching fame:

cobraguy
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

Adding on to @jh1234I's answer, you would want to reset the timer before using the repeat until block.

reset timer
repeat until <(timer) = [?]>
do stuff
end

It's because the timer automatically starts on the launch of the program, and there is no way to stop it.

Last edited by cobraguy (Nov. 21, 2013 16:10:05)

Firedrake969
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

cobraguy wrote:

Adding on to @jh1234I's answer, you would want to reset the timer before using the repeat until block.

reset timer
repeat until <(timer) = [?]>
do stuff//category=grey
end

It's because the timer automatically starts on the launch of the program, and there is no way to stop it.
fixed xD

No support. Easy workaroud.

'17 rickoid

bf97b44a7fbd33db070f6ade2b7dc549
mathfreak231
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

Repeat for a Set Amount of Time

The Scratch Wiki; made by Scratchers, for Scratchers

i have grown as a person. and ive grown, literally. none of my posts from before 2022 represent me accurately.
DevanWolf
Scratcher
100+ posts

"Repeat for ___ secs" blocks

repeat(1)secs::control cstart

Online YouTube Poop Generator is Here! | SimTunes! | Bring Back Backdrop Scroll Blocks! | New Scratch Blocks! | Scratch Soundfont! | Important MIDI Converter!

Please check out those cool games that you will like! Click a game! Any game!
when(mouse y)>(150)
repeat until <(programmers::extension)>(150)>
delete this cap::control cap
end
delete this limit::control cap
Please help Scratch Team remove the 150px Signature Height Cap!
RPFluffy
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

jh1234l wrote:

It can be worked around:
repeat until <(timer) = [?]>

move () steps
end
Or you can use a variable, if you have another spite that uses the timer.

cobraguy wrote:

Adding on to @jh1234I's answer, you would want to reset the timer before using the repeat until block.

reset timer
repeat until <(timer) = [?]>
do stuff
end

It's because the timer automatically starts on the launch of the program, and there is no way to stop it.

Nothing Is EVER 100%, that is just an assumption.















Some important links: Here and here or need help click Here. Eats followers, Loves helping people.
My “..” and “…” are not spelling mistakes, it means that they are ways of telling someone that I can continue more about it and that the sentence isn't ended the best way. I like putting new indents and lines so I can split up what I am talking about.




































Some important links: Here and here or need help click Here. Eats followers, Loves helping people. Check this MMO out! Kiwi = Support WHAT THAT'S IMPOSSIBLE: Through the drop down ;)
if <> :: control cstart

else :: control
end
VoltageGames
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

No support.
If I have a script like
repeat for 10 seconds,
with a wait 11 seconds in it, what happens?

If I have a script like wait 10 seconds
with blocks inside of it,
what happens when the 10 seconds are up and it's in the middle of the scripts?
Will the rest of the scripts inside continue even though the 10 secs are up? Or will they stop and skip ahead of the repeat?

i3-6100 / r9 380 / 8 gigs ram / 1 tb hdd

Click here to inflate my ego and thank me for my posts.


DevanWolf
Scratcher
100+ posts

"Repeat for ___ secs" blocks

repeat(1280)secs::control cstart
say(join[Bump #](timer))

Online YouTube Poop Generator is Here! | SimTunes! | Bring Back Backdrop Scroll Blocks! | New Scratch Blocks! | Scratch Soundfont! | Important MIDI Converter!

Please check out those cool games that you will like! Click a game! Any game!
when(mouse y)>(150)
repeat until <(programmers::extension)>(150)>
delete this cap::control cap
end
delete this limit::control cap
Please help Scratch Team remove the 150px Signature Height Cap!
MathlyCat
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

MegaApuTurkUltra wrote:

RPFluffy wrote:

jh1234l wrote:

It can be worked around:
repeat until <(timer) = [?]>

move () steps
end
Or you can use a variable, if you have another spite that uses the timer.

cobraguy wrote:

Adding on to @jh1234I's answer, you would want to reset the timer before using the repeat until block.

reset timer
repeat until <(timer) = [?]>
do stuff
end

It's because the timer automatically starts on the launch of the program, and there is no way to stop it.
No support as per the workaround
^^^

DevanWolf wrote:

repeat(1280)secs::control cstart
say(join[Bump #](timer))

Dat necro man…. meh, suggestion forums r boss
P.S. DevanWolf, please don't troll by removing the [/scratchblocks] tag :\

Last edited by MathlyCat (July 14, 2015 18:38:47)


Think before you act.
Actions speek louder than words.

hi there fella
scrooge200
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

This sticky rejected it.
DaSpudLord
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

No support, except the workaround should probably look something like this instead-
reset timer
repeat until <<(timer) > []> or <(timer) = []>
...
end


U^ェ^U::motion//This is Blocky. He lives in my signature. He is a trained attack block. He protects my siggy from kumquats.
stickfiregames
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

scrooge200 wrote:

This sticky rejected it.
Is that sticky actually a “do not suggest” list now?

Still no support because the workaround is easy.










If you can read this, my signature cubeupload has been eaten by an evil kumquat!




or you just used Inspect Element, you hacker

;
rollercoasterfan
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

stickfiregames wrote:

scrooge200 wrote:

This sticky rejected it.
Is that sticky actually a “do not suggest” list now?
Well, kind of, but it's really just a list of commonly suggested block workarounds.

Anyway, no support, because of the simple workaround I listed in that link up there.














when [chromometer altimeter v] = [5th length v] and [7th length v] with a [gap v] of (17) ::events hat
forge [chromometer v] altimeter until < (speed) = (velocity)> ::control cstart
switch places with (759 v) altimeters with value of (speed) ::looks
control [altimeter 1 v] at time (10):(17):(58) ::control
end
initialize sequence (24) so [object 3 v] moves to x (156) y (231) ::control
reveal [final answer v] and stop running this script ::events cap
Pixar2000
Scratcher
100+ 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

I think that it can be made by -
define repeat (How much) for (time) secs
repeat (How much)
...::grey//Put anything here.
end
wait (time::custom-arg) secs
stop [this script v]

Para::grey
de::motion
x::variables
This signature is currently being protected by SiggyBot.
(: ::custom-arg) )::custom ring
oooooo new forum server
Austinato
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

jh1234l wrote:

It can be worked around:
repeat until <(timer) = [?]>

move () steps
end
Or you can use a variable, if you have another spite that uses the timer.
Another workaround:
when green flag clicked
repeat (x)
script
wait (1) secs
end
x is how many seconds you want it to wait, reflecting off of the “wait for 1 secs” at the end of the script.


7500+ posts (19th)
Pixar2000
Scratcher
100+ posts

"Repeat for ___ secs" blocks

Not
<[] = []>
It would be
<[] > []>

Para::grey
de::motion
x::variables
This signature is currently being protected by SiggyBot.
(: ::custom-arg) )::custom ring
oooooo new forum server
anguz110
Scratcher
46 posts

"Repeat for ___ secs" blocks

This thread should be dead.

Ample parking day or night, people spouting HOWDY NEIGHBOR!
VideoGamerCanInvent
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

Semi-Support cause of an easy workaround.

woah, haven't been on here in a while
Pixar2000
Scratcher
100+ posts

"Repeat for ___ secs" blocks

How will he watch TV if he can't turn it on?

Para::grey
de::motion
x::variables
This signature is currently being protected by SiggyBot.
(: ::custom-arg) )::custom ring
oooooo new forum server

Powered by DjangoBB