hi folks,
i was having a bit of trouble understanding the Imagesoverlap and imagescollide functions and was wondering if anyone could clear it up for me. What happens when you try to check two images that are not drawn on screen at the place you specify? for example:
global player = loadimage("player1.bmp")
global tile = loadimage("brick")
playerx = 50
playery = 50
tilex = 600
tiley = 600
drawimage player,playerx,playery
drawimage tile,tilex,tiley
now what happens if instead of using tilex,playerx etc i stick in this line:
if imagesoverlap(player,20,500,tile,21,501) then
***some code here***
else
***more code here***
end if
now, for arguments sake, say both images are 50 X 50, so if there were images at teh points in the if statement, they would overlap, but i haven't drawn any images at those locations, so what does blitz do in this situation? Does it place the images temporarily in those locations, check if they overlap then remove them again? or does it just check to see if there is the relevent image drawn at teh x/y co=ords given in the Imagesoverlap function, and automatically return false if there is no image there? I hope i have explained this well, if not, i'll try again lol
thanks folks
~V~
i was having a bit of trouble understanding the Imagesoverlap and imagescollide functions and was wondering if anyone could clear it up for me. What happens when you try to check two images that are not drawn on screen at the place you specify? for example:
global player = loadimage("player1.bmp")
global tile = loadimage("brick")
playerx = 50
playery = 50
tilex = 600
tiley = 600
drawimage player,playerx,playery
drawimage tile,tilex,tiley
now what happens if instead of using tilex,playerx etc i stick in this line:
if imagesoverlap(player,20,500,tile,21,501) then
***some code here***
else
***more code here***
end if
now, for arguments sake, say both images are 50 X 50, so if there were images at teh points in the if statement, they would overlap, but i haven't drawn any images at those locations, so what does blitz do in this situation? Does it place the images temporarily in those locations, check if they overlap then remove them again? or does it just check to see if there is the relevent image drawn at teh x/y co=ords given in the Imagesoverlap function, and automatically return false if there is no image there? I hope i have explained this well, if not, i'll try again lol
thanks folks
~V~