Hiding an image
Blitz3D Forums/Blitz3D Beginners Area/Hiding an image
| ||
Last night I took a break from 3D work to experiment with 2D work.. and come to find out.. it's much easier then I thought... but a problem remains... I made some colision detectors for my smileyface sprite.. so when it colides with some scenery it would stop.. but I cant figure out how to hide the images.. or make them invisible.. help please |
| ||
erm... don't draw them? |
| ||
then what other command allows me to put them there to check collision? **feels dumb** |
| ||
I usually create a type ie Type man field x,y,visible then set visible to 1 in your collision detection code set the man\visible field to 0 when you want it to disappear Somewhere in main loop I have drawman() call to a function which looks like this function drawman() if man\visible=1 then drawimage(man,x,y) else 'any code you want to add here, usually dont require the else bit end function And then just set the field back to 1 when you want it to reappear! |
| ||
that could work.. but while the markers are invisible.. how do I set their x and y positions? |
| ||
I got something to work... but it reqwuired me to hide the colision detectors behind a tiled background |
| ||
You don't actually need to draw any images for the ImagesCollide() function to work (or any of the other image collision detection functions). Just supply the image handles and the screen co-ordinates. |