I need a gridsnap script that will fit a multible-costumed sprite. All costumes are 12x12
I need:
- When clicked, to stamp
- To move the sprite to the mouse on the gridsnap
- Not touch the edges
I will give credit to anybody who can help me, even if you didn't do the final script.
Offline
Making a grid is nice and easy:
round(mousex/(grid square size x value) ) * (grid square size x value)
round(mousey/(grid square size y value) ) * (grid square size y value)
In your case, the grid square size x and y are 12.
Your script would look something like this:
When green flag clicked
clear
forever
|| go to ( round (mousex/12) * 12 ) (round (mousey/12) * 12 )
|| if <touching edge>
|| || hide
|| else
|| || show
|| || if <mouse down>
|| || || stamp
end
Offline
here's somthing to get you started...
enjoy!
http://scratch.mit.edu/projects/Ratty1967UK/2183843
Offline