Discuss Scratch

TheUltimateHoodie
Scratcher
1000+ posts

how do i make a cursor snap to the grid in a tile drawing game?

i know i have to use the celing block or something i just dont know how to
toasty_mc_toastface
Scratcher
99 posts

how do i make a cursor snap to the grid in a tile drawing game?

this code will make the object snap to a grid:

go to x: ((mouse x) - ((mouse x) mod (length of tile))) y: ((mouse y) - ((mouse y) mod (length of tile)))
theflyingmence
Scratcher
73 posts

how do i make a cursor snap to the grid in a tile drawing game?

nice i would have used

go to x: ((tileLenth) * (round ((mouse x) / (TileLenth)))) y: ((tileLenth) * (round ((mouse y) / (TileLenth))))
TheUltimateHoodie
Scratcher
1000+ posts

how do i make a cursor snap to the grid in a tile drawing game?

thanks! closing

Last edited by TheUltimateHoodie (Dec. 26, 2023 00:52:53)

Powered by DjangoBB