Discuss Scratch

alleged_user
New Scratcher
7 posts

why does running without screen refresh change what the block does

if i use a custom block without screen refresh, the end result of what the block did is different than what the block did with screen refresh. why is this happening?
Sebatho
Scratcher
70 posts

why does running without screen refresh change what the block does

When running without screen refresh, Scratch will try to run the custom block as fast as it can. As long as there isn't a wait until, wait ___ seconds, forever, or any other block that takes time to complete, there won't be any lag. The run without screen refresh option will do the code as fast as it can and then it will show the end result. For example, if you wanted a sprite from one side to go until it touches a color on the other side (and you want it to happen instantly) then you press the “run without screen refresh” option.
gagggaggagsg
Scratcher
36 posts

why does running without screen refresh change what the block does

yes like this:
when green flag clicked
say username
define say username
say (username)
deck26
Scratcher
1000+ posts

why does running without screen refresh change what the block does

alleged_user wrote:

if i use a custom block without screen refresh, the end result of what the block did is different than what the block did with screen refresh. why is this happening?
So how was it different? It should do the same thing but if you're not running without screen refresh other scripts may also be changing things which might in turn affect the custom block - eg a variable may have changed during the custom block run which would only happen with no screen refresh if the custom block made the change. Also if you do anything that make the custom block take too long to complete it will lag horribly.
Homeless_Mario68
Scratcher
89 posts

why does running without screen refresh change what the block does

you can also kind of think of “run without screen refresh” as “pause every other script until this scirpt is done”, so if you have a script which relies on another script which runs without screen refresh, then things might work differently
alleged_user
New Scratcher
7 posts

why does running without screen refresh change what the block does

deck26 wrote:

alleged_user wrote:

if i use a custom block without screen refresh, the end result of what the block did is different than what the block did with screen refresh. why is this happening?
So how was it different? It should do the same thing but if you're not running without screen refresh other scripts may also be changing things which might in turn affect the custom block - eg a variable may have changed during the custom block run which would only happen with no screen refresh if the custom block made the change. Also if you do anything that take the custom block take too long to complete it will lag horribly.

I basically have a script that creates clones and changes the clone's costume. if I do it with screen refresh, it goes as intended. if I do it without screen refresh, all of the clones are the same costume.
BigNate469
Scratcher
1000+ posts

why does running without screen refresh change what the block does

alleged_user wrote:

deck26 wrote:

alleged_user wrote:

if i use a custom block without screen refresh, the end result of what the block did is different than what the block did with screen refresh. why is this happening?
So how was it different? It should do the same thing but if you're not running without screen refresh other scripts may also be changing things which might in turn affect the custom block - eg a variable may have changed during the custom block run which would only happen with no screen refresh if the custom block made the change. Also if you do anything that take the custom block take too long to complete it will lag horribly.

I basically have a script that creates clones and changes the clone's costume. if I do it with screen refresh, it goes as intended. if I do it without screen refresh, all of the clones are the same costume.
Hmm…
1. Make sure that there are none of the following blocks in the code:
wait () secs
wait until <>
forever
end
2. Make sure that if you are using a variable to have the clones differentiate between each other, that the variable is set to “this sprite only”
3. Make sure that it is not calling itself in any way, including calling other scripts that call itself (such as using the message block)
4. We can help you better if you give us a link, because that way we can test everything, and with a small team of people working on it we are bound to find the problem sooner that you would on your own.

Powered by DjangoBB