image problem
Blitz3D Forums/Blitz3D Beginners Area/image problem
| ||
www.geocities.com/gjpollitt/Pssst.zip can anyone tell me why i can see the graphic of the insects on the screen yet on the collision function i get an error saying image not valid? debugging this gives me an image id of 0 yet it must be loaded as it is on the screen! thanks graham |
| ||
Function check_collisions() ;if man collides with insect then make the bitch die For insect.insect=Each insect If insect\alive=1 Then If ImagesCollide(man\image ,man\x,man\y ,0,insect\image ,insect\x ,insect\y,0) Then man\alive =0 EndIf EndIf Next End Function Try that - haven't checked if collisions still work tho |
| ||
thanks falken that appears to work ok for some reason, still cant figure out why it didnt before! updated the code now |
| ||
I guess dead insects don't have an image. The program doesn't try to draw dead insects, so no crash there, but it does try to check for collisions with em. |