Discuss Scratch

soarroying
Scratcher
500+ 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

This would look weird in the palate. This has a workaround.
reset timer
repeat until <(timer) > [amount v]>
Do something
end

Generation 7: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
This is not part of my post! This is my signature. And mine has evil kumquat destroying scripts!
when <button [DO NOT PRESS v] pressed? :: extension hat
destruct all living evil kumquats :: pen
when [evil v] kumquat spotted :: events hat
press button [DO NOT PRESS v] :: extension
when [post v] :: events hat
forever
rotate camera to (wanted camera dir) :: extension
make good kumquats :: pen
broadcast [rotate v] and wait until <not <(wanted camera dir) = (old wanted camera dir)>> :: events
end
ᵔᴥᵔ :: sound boolean //This is Sally! She will protect me if my siggy is attacked by evil kumquats.
:3 :: custom reporter //This is Jake! He is a good kumquat that has an appetite of unconstructive posts.
;D :: sensing boolean //This is Marcus! He is a pancake that will rickroll you if you use the support convention.
ඞ :: extension reporter //This is crewposter! He attacks evil kumquat factories.

Had a bad day and want to cheer up? This might just do the trick.
Read this before suggesting.

^Credit to @7salad3salad for the banner.
ᚠᚮᛚᛚᚮᚡ ᛐᚮ ᛒᛂ ᚿᛁᛌᛂ
cooldude-222
Scratcher
100+ posts

"Repeat for ___ secs" blocks

What if you need the timer for something

Have a nice day!
soarroying
Scratcher
500+ posts

"Repeat for ___ secs" blocks

cooldude-222 wrote:

What if you need the timer for something
NO IDEA

Generation 7: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
This is not part of my post! This is my signature. And mine has evil kumquat destroying scripts!
when <button [DO NOT PRESS v] pressed? :: extension hat
destruct all living evil kumquats :: pen
when [evil v] kumquat spotted :: events hat
press button [DO NOT PRESS v] :: extension
when [post v] :: events hat
forever
rotate camera to (wanted camera dir) :: extension
make good kumquats :: pen
broadcast [rotate v] and wait until <not <(wanted camera dir) = (old wanted camera dir)>> :: events
end
ᵔᴥᵔ :: sound boolean //This is Sally! She will protect me if my siggy is attacked by evil kumquats.
:3 :: custom reporter //This is Jake! He is a good kumquat that has an appetite of unconstructive posts.
;D :: sensing boolean //This is Marcus! He is a pancake that will rickroll you if you use the support convention.
ඞ :: extension reporter //This is crewposter! He attacks evil kumquat factories.

Had a bad day and want to cheer up? This might just do the trick.
Read this before suggesting.

^Credit to @7salad3salad for the banner.
ᚠᚮᛚᛚᚮᚡ ᛐᚮ ᛒᛂ ᚿᛁᛌᛂ
IDontNoWatIAm
Scratcher
500+ posts

"Repeat for ___ secs" blocks

cooldude-222 wrote:

What if you need the timer for something
Something like this?

when green flag clicked
broadcast [time v]
repeat until <(timer) > ((time) + (amount of seconds))> //time of activation added to amount of seconds
blocks
end

when I receive [time v] // saves timer time when the block is called on
set [time] to (timer)

Legend has it that to this day, there is still no effort to patch the GoGuardian freeze bug
wacky man with 500+ forum posts
blah blah blah this is my siggy under the gray line blah blah blah kumquat ate the rest blah blah blah

set pen color to [test]
M0LDYGH
Scratcher
9 posts

"Repeat for ___ secs" blocks

maybe
repeat for (2) secs

Hello there, I'm @M0LDYGH. Not MoldyGH.
I actually know a lot about scratchblocks.
So it's most helpful on the wiki.

But, sadly the wiki isint the same as scratchblocks.
I'm also sort of learning python.
when green flag clicked
set (username v) to [@M0ldygh v]
historical_supa
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

M0LDYGH wrote:

maybe
repeat for (2) secs
That is a stack block however.

i love life
soarroying
Scratcher
500+ posts

"Repeat for ___ secs" blocks

IDontNoWatIAm wrote:

cooldude-222 wrote:

What if you need the timer for something
Something like this?

when green flag clicked
broadcast [time v]
repeat until <(timer) > ((time) + (amount of seconds))> //time of activation added to amount of seconds
blocks
end

when I receive [time v] // saves timer time when the block is called on
set [time] to (timer)
GREAT IDEA!!!!
<(answer) = [Yes v]>

Generation 7: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
This is not part of my post! This is my signature. And mine has evil kumquat destroying scripts!
when <button [DO NOT PRESS v] pressed? :: extension hat
destruct all living evil kumquats :: pen
when [evil v] kumquat spotted :: events hat
press button [DO NOT PRESS v] :: extension
when [post v] :: events hat
forever
rotate camera to (wanted camera dir) :: extension
make good kumquats :: pen
broadcast [rotate v] and wait until <not <(wanted camera dir) = (old wanted camera dir)>> :: events
end
ᵔᴥᵔ :: sound boolean //This is Sally! She will protect me if my siggy is attacked by evil kumquats.
:3 :: custom reporter //This is Jake! He is a good kumquat that has an appetite of unconstructive posts.
;D :: sensing boolean //This is Marcus! He is a pancake that will rickroll you if you use the support convention.
ඞ :: extension reporter //This is crewposter! He attacks evil kumquat factories.

Had a bad day and want to cheer up? This might just do the trick.
Read this before suggesting.

^Credit to @7salad3salad for the banner.
ᚠᚮᛚᛚᚮᚡ ᛐᚮ ᛒᛂ ᚿᛁᛌᛂ
cooldude-222
Scratcher
100+ posts

"Repeat for ___ secs" blocks

IDontNoWatIAm wrote:

cooldude-222 wrote:

What if you need the timer for something
Something like this?

when green flag clicked
broadcast [time v]
repeat until <(timer) > ((time) + (amount of seconds))> //time of activation added to amount of seconds
blocks
end

when I receive [time v] // saves timer time when the block is called on
set [time] to (timer)
What if I need to constantly reset the timer for a stop button detector.

Have a nice day!
MrJJib
Scratcher
32 posts

"Repeat for ___ secs" blocks

I already made a forum for this

This is my signature it appears on every post I make.

"o_o"
this is Bobby Bob Dan
He protects me from darth vader

Hey minecrafters listen to this and be happy https://www.youtube.com/watch?v=cPJUBQd-PNM
7salad3salad
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

MrJJib wrote:

I already made a forum for this
I guarantee this one was made before yours, and anyways this is off-topic


Forumer Post Count Bar Graph! (inspired by AIGamesDeveloper)
Project: Forummon by randomguy3513
hi, contrast
JUST BECAUSE THERES A WORKAROUND ISNT A GOOD REASON TO NOT SUPPORT!!!

dont call me 7salad
dont call me 7salsa lol
just simply “Salad” will do.

:]::#00289A// This is my pet Noobles! He protects my signature from [i]unwanted guests[/i]

B){

}::#800080//This is Noobles' big brother, Probles. He has returned and Noobles is happy to see him!
//oh, yeah, he is also cool so he wears sunglasses.

:P::cap sensing//This is their little brother, Doobles

old banner thnng
RubiksRocker
Scratcher
100+ posts

"Repeat for ___ secs" blocks

IDontNoWatIAm wrote:

cooldude-222 wrote:

What if you need the timer for something
Something like this?

when green flag clicked
broadcast [time v]
repeat until <(timer) > ((time) + (amount of seconds))> //time of activation added to amount of seconds
blocks
end

when I receive [time v] // saves timer time when the block is called on
set [time] to (timer)

You would need to reset the timer once it receives the message.
when I receive [time v]
reset timer

RubiksRocker
Cool Nerd - Rocker - Cuber - Coder - Shark Activist - Footballer
Support this suggestion for new Flip Horizontal, Vertical, and Diagonal blocks here!
Support this suggestion for the absolutely-essential Pineapple emoji here!
Support this suggestion for the ability to report one's featured project on their profile here!
April Fool's 2023 Audition here!
WhyDidlMakeThis
New to Scratch
3 posts

"Repeat for ___ secs" blocks

Pixar2000 wrote:

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

e
dertermenter_easy
Scratcher
58 posts

"Repeat for ___ secs" blocks

bump




dertermenter, creator for 5 years, 760 followers and counting!:)

;
saverofthewo
Scratcher
100+ posts

"Repeat for ___ secs" blocks

the workaround doesn't work, stop sign detector, or anything that utilizes the reset timer block will break it. please stop.

I want the Scratch Team to #ConsiderCollabs! Help save Scratch's unshared projects feature before it's too late!
well its too late already but you know
oh my god look its my old signature

Hello!
I am a big fan of terraria. I love the exploring and building and boss fights!

heres the part that isnt old
uh instert kumquat joke here
uhhh uhhhhh SHOAESUDJKVNS
does
it
no it doesnt why whywhywhywhyoh my god why does this existbut does it work?oh my god it doeswoahwoahwoah
k0d3rrr
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

Bump. This is very useful for projects where you need to repeat something for a certain amount of seconds.


Animated button created by me


Despite what my About section says, I have been using Scratch before 2019. 2019 was the year that I first joined Scratch.
soarroying
Scratcher
500+ posts

"Repeat for ___ secs" blocks

M0LDYGH wrote:

maybe
repeat for (2) secs
Fixed mockup:
repeat for (2) secs {
} :: control

Last edited by soarroying (Oct. 15, 2022 15:16:24)


Generation 7: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
This is not part of my post! This is my signature. And mine has evil kumquat destroying scripts!
when <button [DO NOT PRESS v] pressed? :: extension hat
destruct all living evil kumquats :: pen
when [evil v] kumquat spotted :: events hat
press button [DO NOT PRESS v] :: extension
when [post v] :: events hat
forever
rotate camera to (wanted camera dir) :: extension
make good kumquats :: pen
broadcast [rotate v] and wait until <not <(wanted camera dir) = (old wanted camera dir)>> :: events
end
ᵔᴥᵔ :: sound boolean //This is Sally! She will protect me if my siggy is attacked by evil kumquats.
:3 :: custom reporter //This is Jake! He is a good kumquat that has an appetite of unconstructive posts.
;D :: sensing boolean //This is Marcus! He is a pancake that will rickroll you if you use the support convention.
ඞ :: extension reporter //This is crewposter! He attacks evil kumquat factories.

Had a bad day and want to cheer up? This might just do the trick.
Read this before suggesting.

^Credit to @7salad3salad for the banner.
ᚠᚮᛚᛚᚮᚡ ᛐᚮ ᛒᛂ ᚿᛁᛌᛂ
soarroying
Scratcher
500+ posts

"Repeat for ___ secs" blocks

mrcreatorluigi wrote:

Support. Why? Can you explain?

Generation 7: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
This is not part of my post! This is my signature. And mine has evil kumquat destroying scripts!
when <button [DO NOT PRESS v] pressed? :: extension hat
destruct all living evil kumquats :: pen
when [evil v] kumquat spotted :: events hat
press button [DO NOT PRESS v] :: extension
when [post v] :: events hat
forever
rotate camera to (wanted camera dir) :: extension
make good kumquats :: pen
broadcast [rotate v] and wait until <not <(wanted camera dir) = (old wanted camera dir)>> :: events
end
ᵔᴥᵔ :: sound boolean //This is Sally! She will protect me if my siggy is attacked by evil kumquats.
:3 :: custom reporter //This is Jake! He is a good kumquat that has an appetite of unconstructive posts.
;D :: sensing boolean //This is Marcus! He is a pancake that will rickroll you if you use the support convention.
ඞ :: extension reporter //This is crewposter! He attacks evil kumquat factories.

Had a bad day and want to cheer up? This might just do the trick.
Read this before suggesting.

^Credit to @7salad3salad for the banner.
ᚠᚮᛚᛚᚮᚡ ᛐᚮ ᛒᛂ ᚿᛁᛌᛂ
epicboi17
Scratcher
100+ posts

"Repeat for ___ secs" blocks

since scratch is 30 fps, you can just
repeat ((seconds) * (30))

end

i never follow discussions if it isnt mine so if you responded to me go to my profile if you want i guess
Little_Mittle12345
Scratcher
100+ posts

"Repeat for ___ secs" blocks

when green flag clicked
repeat for (2) seconds{
glide (1) secs to [random position v]:: motion}:: control
Hmmmmm super hard workaround

bfiwurbviubr vkjrnrgiorbgouebijernerjo
e, No Flash version detectededw, No Flash version detecteddw, No Flash version detectedda, No Flash version detected, No Flash version detectedd, No Flash version detectedwa, No Flash version detectedd, No Flash version detecteds, No Flash version detectedd, No Flash version detectedawd, No Flash version detectedwasw
move ()ewd steps
move (aw) steps
move (w) steps
move (dewd) steps
move () steps
move (wad) steps
move () steps
move () steps
move () steps
soarroying
Scratcher
500+ posts

"Repeat for ___ secs" blocks

Little_Mittle12345 wrote:

This quote was eaten by an evil banana
Well? The workaround it easy, and you can put it in your backpack so you can use it everywhere.
when green flag clicked
set [v v] to [0] //I'm just using v as an example you can name it whatever you want
broadcast [loooop v]
time
When I receive [loooop v]
repeat until <(v)=(insert number here)> //Put the code inside and you're done!

end
define time
repeat until <(v)=(insert number here)>
wait (1) secs
change [v v] by (1)
end
set [v v] to [0]
Ok, maybe saying you could put it in your backpack was a fib sorry :(

Generation 7: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
This is not part of my post! This is my signature. And mine has evil kumquat destroying scripts!
when <button [DO NOT PRESS v] pressed? :: extension hat
destruct all living evil kumquats :: pen
when [evil v] kumquat spotted :: events hat
press button [DO NOT PRESS v] :: extension
when [post v] :: events hat
forever
rotate camera to (wanted camera dir) :: extension
make good kumquats :: pen
broadcast [rotate v] and wait until <not <(wanted camera dir) = (old wanted camera dir)>> :: events
end
ᵔᴥᵔ :: sound boolean //This is Sally! She will protect me if my siggy is attacked by evil kumquats.
:3 :: custom reporter //This is Jake! He is a good kumquat that has an appetite of unconstructive posts.
;D :: sensing boolean //This is Marcus! He is a pancake that will rickroll you if you use the support convention.
ඞ :: extension reporter //This is crewposter! He attacks evil kumquat factories.

Had a bad day and want to cheer up? This might just do the trick.
Read this before suggesting.

^Credit to @7salad3salad for the banner.
ᚠᚮᛚᛚᚮᚡ ᛐᚮ ᛒᛂ ᚿᛁᛌᛂ

Powered by DjangoBB