OK guys, I think this is a BUG. Check this out and tell me what you think.
I've added some extra checks to narrow down the problem. Here's the code:
Now so far in my tests, I've had the MAV occur on the FIRST ImagesCollide line (which isn't so surprising) but I've ALSO had the MAV occur on the THIRD ImagesCollide line. And you'll notice that the THIRD line uses the same images and objects that the first two do, so it SHOULD HAVE MAV'd on one of the first two if it was MY mistake, don't you agree?
Also, in case it helps, which I doubt, but here's some of the object data for the objects in question one of the times I got the MAV on the THIRD ImagesCollide line:
I've added some extra checks to narrow down the problem. Here's the code:
For thisBullet.bullettype = Each bullettype exitloop = False For thisship.shiptype = Each shiptype If thisship\ID = 2 If thisbullet\image = 0 Then DebugLog "thisbullet\image=0" If thisship\image = 0 Then DebugLog "thisship\image=0" If thisbullet=Null Then DebugLog "thisbullet=null" If thisship=Null Then DebugLog "thisship=null" If ImagesCollide(thisbullet\image, thisbullet\bulletx, thisbullet\bullety, 0, ship\image, ship\shipx, ship\shipy, 0) EndIf If ImagesCollide(ship\image, ship\shipx, ship\shipy, 0, thisship\image, thisship\shipx+400, thisship\shipy+300, 0) EndIf If ImagesCollide(thisbullet\image, thisbullet\bulletx, thisbullet\bullety, 0, thisship\image, thisship\shipx+400, thisship\shipy+300, 0) FreeImage thisBullet\image Delete thisBullet FreeImage thisship\image Delete thisship exitloop = True EndIf EndIf If exitloop = True Then Exit Next Next
Now so far in my tests, I've had the MAV occur on the FIRST ImagesCollide line (which isn't so surprising) but I've ALSO had the MAV occur on the THIRD ImagesCollide line. And you'll notice that the THIRD line uses the same images and objects that the first two do, so it SHOULD HAVE MAV'd on one of the first two if it was MY mistake, don't you agree?
Also, in case it helps, which I doubt, but here's some of the object data for the objects in question one of the times I got the MAV on the THIRD ImagesCollide line:
thisship.shiptype id=2 image=25195528 shipx#=-440.574 shipy#=-910.735 rotation=169 velocity#=-1.0 thisbullet.bullettype image=25200528 bulletx#=-84.7722 bullety#=-635.957 xangle#=0.848048 yangle#=-0.529919 velocity#=10.0