Discuss Scratch

Europe2048
Scratcher
27 posts

"Repeat for ___ secs" blocks

DevanWolf wrote:

repeat(1280)secs::control cstart
say(join[Bump #](timer))[/quote]
Can be worked around:
[scratchblocks]
reset timer
repeat until <(timer) = (1280)>
say [join (Bump #) (timer)]
end
Europe2048
Scratcher
27 posts

"Repeat for ___ secs" blocks

Europe2048 wrote:

DevanWolf wrote:

repeat(1280)secs::control cstart
say(join[Bump #](timer))[/quote]
Can be worked around:
[scratchblocks]
reset timer
repeat until <(timer) = (1280)>
say [join (Bump #) (timer)]
end[/quote]
Oh no.
Europe2048
Scratcher
27 posts

"Repeat for ___ secs" blocks

I didn't mean that…
Little_Mittle12345
Scratcher
100+ posts

"Repeat for ___ secs" blocks

Little_Mittle12345 wrote:

-Valtren- wrote:

Little_Mittle12345 wrote:

how about
repeat for (1) seconds if possible{
wait (9) secs}:: control
why if possible? it should always be possible
No
NO again.
should be renamed while waiting () secs
1: less ambigous (whatever that word means)
2: solves problems
while waiting (1) secs{
}:: control

Last edited by Little_Mittle12345 (Nov. 3, 2022 21:37:10)


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
Little_Mittle12345
Scratcher
100+ posts

"Repeat for ___ secs" blocks

SavetheAtlantic wrote:

Little_Mittle12345 wrote:

Stop No support easy workaround. its a HARD WORKAROUND. forever block has a workaround. Can you remove it? or many blocks?
It's nothing. And just because some blocks have an easy workaround doesn't mean that we should remove them, or that we should add more blocks with easy workarounds. With that justification, you could suggest ridiculous blocks like these:
play sound [ v] and then go to x: () y: () ::sound
broadcast [ v] until [var v] = () ::events
You get the point.
i didnt read my post correctluyy

Last edited by Little_Mittle12345 (Nov. 3, 2022 21:34:49)


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

"Repeat for ___ secs" blocks

What if it runs out of time in the middle of running a script?


(Male) (He/Him) (2000+ posts) (4 Years)
Banner by depresso-boiyo, check him out!
Ctrl+shift+down to check out my projects!


Thanks for scrolling; if you like what I do, please follow me!
Little_Mittle12345
Scratcher
100+ posts

"Repeat for ___ secs" blocks

randomguy3513 wrote:

What if it runs out of time in the middle of running a script?
it will keep going.

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

"Repeat for ___ secs" blocks

when green flag clicked
set [page v] to [1]

randomguy3513 wrote:

What if it runs out of time in the middle of running a script?
It will probably stop in the middle of it or just keep going until the loop ends.

Medians bamboozled by 3.0 (version 3.0): https://scratch.mit.edu/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch.mit.edu/studios/33739789
Years on internet: 15 (soon 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that

Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.

Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness
i trolled redcat LOL





if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;
-ErrorPurpl_157
Scratcher
100+ posts

"Repeat for ___ secs" blocks

Unithlees3 wrote:

No support, There is an easy workaround:
reset timer
repeat until <(timer) > (number :: custom)>
...
end
But that wouldn’t work for other scripts using the timer. This is a better workaround
when I receive [i am obsessed with hat blocks v]
set [looptimer v] to [0]
repeat until <(looptimer) = […]>
if <(looptimer) = […]> then
broadcast [new script v]
stop [this script v]
else

end
end

when I receive [i am obsessed with hat blocks v]
repeat until <(looptimer) = […]>
wait (0.01) secs
change [looptimer v] by (0.01)
end

when I receive [new script v]

No signature currently stored in profile. (we all know that’s cap)

Technoblade Never Dies -Everyone
==================================
My old account ≈> TheRealAGJ
Want to make the NYC subway? ≈> Click Here
This is how I make mockups ≈> Over Here
==================================
ninjahanzo
Scratcher
500+ posts

"Repeat for ___ secs" blocks

bumpy bump



Make pixel art | C.A. 2 Proposal | 500th post | AY: me and medians 2nd scratch bdays
Be high contrast
____________________________________________________________________________________________________________________
anti-kumquat chip 5000 v2.5.60
siggy protectors hosted here
Little_Mittle12345
Scratcher
100+ posts

"Repeat for ___ secs" blocks

,

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

"Repeat for ___ secs" blocks

AT WHAT FREQUENCY

sorry for bad english
Elijah999999
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

Since Scratch runs at 30 FPS, (frames per second,) this is a highly efficient workaround:
repeat ((wanted number) * (30))
... :: grey
end

Pretty much only use the forums for save codes now.

Here is my Mario Maker (fan game) world code:
https://scratch.mit.edu/discuss/topic/743192/?page=57#post-8009005
Elijah999999
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

What if lag causes the block to repeat less times than it should? That could cause unintended consequences. I think that
repeat ((number of seconds) * (30))

end
is a much more reliable method.

Whoops, I've posted here before, heh heh…

Last edited by Elijah999999 (Sept. 17, 2023 19:35:53)


Pretty much only use the forums for save codes now.

Here is my Mario Maker (fan game) world code:
https://scratch.mit.edu/discuss/topic/743192/?page=57#post-8009005
GunesKing
Scratcher
100+ posts

"Repeat for ___ secs" blocks

Elijah999999 wrote:

What if lag causes the block to repeat less times than it should? That could cause unintended consequences. I think that
repeat ((number of seconds) * (30))

end
is a much more reliable method.

That is an intelligent point, but there are two ways to think about this order, and they oppose to each other.
1) To repeat a good amount
2) To repeat wrt fixed time

What I mean is, the idea for this topic was to repeat almost perfectly by seconds, where repeating numerically would be okay. Another idea is to prevent any lag. Your new idea is reliable to repeat a good amount, where it would repeat 30s (s for seconds), but at the end, it doesn't do anything. Your idea would be analysed by scratch by simply multiply 30 and s, and not care how long it takes. That defeats the purpose of the beginning of the topic. So your idea is superior for the amount of times, but not the time itself.

The blue timer variable is unique, and it doesn't work wrt to scratch, but wrt your device time (maybe not for precise second). If you want proof, edit your clock in your device, a minute later, scratch will detect and change the (hour), (minute), and (second).

Your algorithm is not wrt device clock, so it may not keep track of time very well. I can give you another visual example. A tower clock was a smidge off (unnoticable to humans probably) some time ago, now it's 25 minutes off!


Anyways for the entire topic, I give less support. There is another blue variable workaround, logging the (days since 2000 block) for precise time, and boy I mean PRECISE. Decoding it is a bit tricky, but some scratchers know it. You might as well check it out.

I am planning to leave scratch soon. Should I?
wilhelm43
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

Even if this is workaroundable, support for easier use ^^


~ Wiki FR ~ Wiki EN ~

Besoin d'aide ? Des questions sur le forum francophone ou ses règles ? N'hésitez pas à demander !
Greetings, I'm wilhelm43, a French Scratcher.
cookieclickerer33
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

Timer is NOT a workaround for this block

If 2 are running or the time is being used elsewhere in the project this block will not work!
A better workaround is
Set [desired time v] to [30]
Set [secs v] to [3]
repeat ((desired time) / (secs)
wait ((secs)/ (desired time)) secs
end
Not 100% sure if this works but if it does you would need to make 2 new variables each time you use this in a project

Last edited by cookieclickerer33 (Sept. 22, 2023 13:13:37)


⠀ ⠀ I beat Mario 64 yay! ⠀⠀ ⠀ ⠀ ⠀ ⠀ I love you ivy & may :3
⠀ ⠀ ⠀ ⠀ ⠀ ⠀⠀ ⠀ ⠀GEOMETRY DASH

cookieclickerer33
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

randomguy3513 wrote:

What if it runs out of time in the middle of running a script?
Same as repeat until

⠀ ⠀ I beat Mario 64 yay! ⠀⠀ ⠀ ⠀ ⠀ ⠀ I love you ivy & may :3
⠀ ⠀ ⠀ ⠀ ⠀ ⠀⠀ ⠀ ⠀GEOMETRY DASH

gdfsgdfsgdfg
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

If the variable has to be same as the timer:
https://scratch.mit.edu/projects/906865014/


1000th post also use -forbidden- or highlight and ctrl (optional on some browsers) + shift + down arrow for more of my siggy


I gotta go touch sum grass

If it causes issues make it optional - gdfsgdfsgdfg

Do some research before replying to my posts - gdfsgdfsgdfg

curse you 60 sec rule

glory to Gdfsg Land

gdfsgdfsgdfg returns

Ocular(don’t look at my old posts plz)
PostPercent

kumquats? nah
my siggy is built with titani- *gets eaten*

A new game that no one asked for:
https://scratch.mit.edu/projects/1035251507/

Are you sleeping you tall cat (project):
https://scratch.mit.edu/projects/1002042247/

The only suggestions I fully support are:
https://scratch.mit.edu/projects/924995948/

Don’t force me to get proof
get it yourself

my favorite topic is this (due to comedic purposes):
https://scratch.mit.edu/discuss/topic/709979/

my favorite post is this (it’s deleted but I got it from ocular):
https://ocular.jeffalo.net/post/7517300

Grand borrowing cars IV intro and loading (template):
https://scratch.mit.edu/projects/972295666/

Guess the game by its mission name:
https://scratch.mit.edu/discuss/topic/750145/

GBC (GTA) topic:
https://scratch.mit.edu/discuss/topic/751981/

BF (Battlefield) topic:
https://scratch.mit.edu/discuss/topic/753243/

still don’t have the popularity lol (atleast I reached 100 followers)

Skill issue

reject
Embrace :)

Help I ran out of ideas
gdfsgdfsgdfg
Scratcher
1000+ posts

"Repeat for ___ secs" blocks

bump cuz dupe (forgot to bump this)


1000th post also use -forbidden- or highlight and ctrl (optional on some browsers) + shift + down arrow for more of my siggy


I gotta go touch sum grass

If it causes issues make it optional - gdfsgdfsgdfg

Do some research before replying to my posts - gdfsgdfsgdfg

curse you 60 sec rule

glory to Gdfsg Land

gdfsgdfsgdfg returns

Ocular(don’t look at my old posts plz)
PostPercent

kumquats? nah
my siggy is built with titani- *gets eaten*

A new game that no one asked for:
https://scratch.mit.edu/projects/1035251507/

Are you sleeping you tall cat (project):
https://scratch.mit.edu/projects/1002042247/

The only suggestions I fully support are:
https://scratch.mit.edu/projects/924995948/

Don’t force me to get proof
get it yourself

my favorite topic is this (due to comedic purposes):
https://scratch.mit.edu/discuss/topic/709979/

my favorite post is this (it’s deleted but I got it from ocular):
https://ocular.jeffalo.net/post/7517300

Grand borrowing cars IV intro and loading (template):
https://scratch.mit.edu/projects/972295666/

Guess the game by its mission name:
https://scratch.mit.edu/discuss/topic/750145/

GBC (GTA) topic:
https://scratch.mit.edu/discuss/topic/751981/

BF (Battlefield) topic:
https://scratch.mit.edu/discuss/topic/753243/

still don’t have the popularity lol (atleast I reached 100 followers)

Skill issue

reject
Embrace :)

Help I ran out of ideas

Powered by DjangoBB