ImageClicked

Blitz3D Forums/Blitz3D Programming/ImageClicked

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hey, how about....

function find_image()
  for t.type=each type
     if imagecollided(t\image_handle,t\x,t\y,0,pointer,mousex(),mousey(),0) then
         return t.type ; don't actually know what here, but you've found the type object you want
     end if
  next
end function


search thru all the types comparing the pointer image against the tile and returns the type object?? I dunno what to do once you've found the image :)

May i suggest you create a very small image (1x1) at the tip of the pointer and use that for imagecolliding. More accurate, and it's impossible to select two tiles at once :)