How can I predict which sprite will beo n top when two sprites occupy the same region of the screen? Obviously this is aesthetically importnt but rightn ow this is importnt for me bd I want to send a message if a crosshair is clicked, but the crosshair is always behind the target sprite! My project is currently here if that helps:
http://scratch.mit.edu/projects/clintonhackers/1027449
though it's going to change quickly i think.
thanks much!
matt
Offline
the easy answer is to use the <go to front> block on your cross-hair
I use a slightly more flexible algorithm to enable layers in my projects - using a global variable for zpos iterated from 10 down to 1 and broadcast all sprites to set their zposition - if zpos matches the proposed zposition of the sprite then it does a <go to front>
Offline
That's great, thanks so much fo the help! i like the zpos solution as well, if we do something more complex I'll use a version of it.
thanks again,
mat
Offline