Discuss Scratch

damasbinabdulmalik
New Scratcher
46 posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

can someone give me an example of a repeating or looping script with the custom block's structure
56-s
Scratcher
500+ posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

define walk
repeat (10)
move (1) steps
next costume
end

when green flag clicked
forever
Walk
end

Easy for animations.

google wrote:

In general, ‘Run without screen refresh’ is a great way to reduce lag in scripts where speed is essential. But never use it in a script with ‘wait’ or ‘forever’ blocks, or it will cause

Last edited by 56-s (May 22, 2024 14:03:48)

damasbinabdulmalik
New Scratcher
46 posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

so basically if i just make any script, put it in a custom block, then put the custom block on a forever block, thats what a “run without screen refresh” is?
56-s
Scratcher
500+ posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

damasbinabdulmalik wrote:

so basically if i just make any script, put it in a custom block, then put the custom block on a forever block, thats what a “run without screen refresh” is?
Not really but I could make a better example it is more of a way to make everything go all at one if you just put the code directly into the forever then it will do it 1 by one but with the without screen refresh blocks it does it all at once.
damasbinabdulmalik
New Scratcher
46 posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

do i need to always put 10 on the repeat block
56-s
Scratcher
500+ posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

damasbinabdulmalik wrote:

do i need to always put 10 on the repeat block
No
deck26
Scratcher
1000+ posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

It just means the custom block will try to run to completion within one frame. If it can't then it will lag horribly but if it can it will greatly speed things up. Try changing the custom block in this project https://scratch.mit.edu/projects/55182496/ to run without that option ticked.

The problems with not completing in one frame is why you should never have any wait blocks in a custom block set to run this way and should ensure any loops have a way of stopping.
damasbinabdulmalik
New Scratcher
46 posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

If my code is based on time, what should i replace the “wait” command with
grkw2020
Scratcher
500+ posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

Anything under a “run without screen refresh” hat block will run instantly, so there's no point in putting wait blocks within it.
FroYo666
Scratcher
29 posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

If you check the “run without screen refresh” box, the block will instantly perform the task without waiting at all. Watch this Griffpatch video at the timestamp 13:13, Context: making an instant outline on backdrop.
https://www.youtube.com/watch?v=KWZldY-Xtpw&t=362s
damasbinabdulmalik
New Scratcher
46 posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

Okay, i think ive finally found what i've wanted from the start, its a metronome, somehow i cant speak up my problem correctly, so i think ill have to change the topic, it looks like there WAS a tempo variable 10 years ago (saw it on a video) but now its gone, so how do i make a metronome?

Last edited by damasbinabdulmalik (May 23, 2024 01:26:58)

FroYo666
Scratcher
29 posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

when green flag clicked
forever
wait (However long you want your metronome to be) secs
set [Metronome v] to [1]
wait (0.0000000000000000001) secs
set [Metronome v] to [0]
end

This i think

Last edited by FroYo666 (May 23, 2024 01:32:14)

damasbinabdulmalik
New Scratcher
46 posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

Screen refresh. And ive actually found another discussion with my question, i should've searched first then asked later, silly me.
Woodfur
Scratcher
100+ posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

I think you might be looking for the music module. Click the purple “extensions” tab at the bottom of the sidebar, add Music, and then you'll have the tempo variable and all the music blocks.
damasbinabdulmalik
New Scratcher
46 posts

I dont, no, i cant understand what a "run without screen refresh" custom block is

wait that is real

Powered by DjangoBB