This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-09-08 16:00:38

colorfusion
Scratcher
Registered: 2009-10-03
Posts: 500+

Way off mouse click, leaving half tiles. *HELP*

http://scratch.mit.edu/projects/colorfusion/1287576

In that game you are meant to be able to click on a brick, the brick will get a crack stamped on it then stamped over with something to hide it.
I am trying to make it so that when you click, it goes to your mouse, then rounds itself to the nearest 16 pixels, then adds/subtracts a little bit to make it in line with the bricks.
The problem is online the lining up is completely off and leaves half bricks, and offline it does it half the time, but not the other.
AND due to the lining up script wherever you click the crack appears a load up and to the left!

Can anyone please fix this? Or at-least look into what could be causing some of the problems?

Thanks
-colorfusion

Last edited by colorfusion (2010-09-08 16:01:14)

Offline

 

#2 2010-09-08 21:12:11

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Way off mouse click, leaving half tiles. *HELP*

I got it!  big_smile  Here's the fixed version.

Last edited by Harakou (2010-09-08 21:18:17)


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer