Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » need help with fill script
- dave-alt-4
-
Scratcher
1000+ posts
need help with fill script
i tried using (run without screen refresh)

but it becomes so laggy that i cant run it ,i know i can just use pen size(I'm using it rn) but is there a way to properly draw a filled rectangle?
project here

but it becomes so laggy that i cant run it ,i know i can just use pen size(I'm using it rn) but is there a way to properly draw a filled rectangle?
project here
Last edited by dave-alt-4 (Nov. 4, 2021 01:30:39)
- Thingied
-
Scratcher
1000+ posts
need help with fill script
Script can be shortened down to this:

How it works is that it draws the two given x coordinates at the given y level, and changes the y level every single tick which causes it to draw from side to side. This makes it so that you don't need to really worry about the x axis because the only thing that changes is the y axis.
One thing to note is that I used a join block instead of if statements to change filly because JS treats +n as a number.

How it works is that it draws the two given x coordinates at the given y level, and changes the y level every single tick which causes it to draw from side to side. This makes it so that you don't need to really worry about the x axis because the only thing that changes is the y axis.
One thing to note is that I used a join block instead of if statements to change filly because JS treats +n as a number.
- Discussion Forums
- » Help with Scripts
-
» need help with fill script