image problem

Blitz3D Forums/Blitz3D Beginners Area/image problem

767pilot(Posted 2004) [#1]
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


Who was John Galt?(Posted 2004) [#2]
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


767pilot(Posted 2004) [#3]
thanks falken

that appears to work ok for some reason, still cant figure out why it didnt before!

updated the code now


Who was John Galt?(Posted 2004) [#4]
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.