Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Same scripts, but 2 results?
- P444
-
Scratcher
500+ posts
Same scripts, but 2 results?
So, I was rendering some height maps earlier. Figured I would use a no screen refresh block, but it turn out something went wrong! Apparently, the render gets “cut off” at some places while running in no screen refresh mode. So, to make sure my scripts were not at fault, I checked with screen refresh (but with turbo) and it worked fine. Are my scripts the problem or something else?
Link : https://scratch.mit.edu/projects/129285464/
Link : https://scratch.mit.edu/projects/129285464/
- asivi
-
Scratcher
1000+ posts
Same scripts, but 2 results?
It happens because the custom no refresh block can't do all the job at once (needs more time than a screen refresh)
when green flag clicked
clear
pen up
set pen size to (2)
Gen :: custom
go to x: (-25) y: (50)
set [basic x v] to [-25]
set [count v] to [0]
repeat (240)
set y to (50)
set x to (basic x)
change x by ((count) / (100))
No refresh :: custom
end
define No refresh
repeat (100)
set [prev x v] to (x position)
set [prev y v] to (y position)
change [count v] by (1)
set pen shade to (50)
pen down
repeat (item (count) of [Noise Map v] :: list)
change y by (1)
change pen shade by (2)
end
pen up
set y to (prev y)
set x to (prev x)
change x by (-2)
change y by (-2)
end
- P444
-
Scratcher
500+ posts
Same scripts, but 2 results?
It happens because the custom no refresh block can't do all the job at once (needs more time than a screen refresh)Hmm, thanks for the info! Still a bit confused why a simple script like that needs that much time to be executed

- Discussion Forums
- » Help with Scripts
-
» Same scripts, but 2 results?