Hi,
I've been trying to add collision to my little game, here is what I came up with:
EnemyBulletCollision:
For i = 1 to 20
For j = 1 to 500
If Sprite Exist(149 + i) And Sprite Exist(2 + j)
If Sprite Hit(2 + j,149 + i) = 1
Hide Sprite 2 + j
Hide Sprite 149 + i
Endif
Endif
Next j
Next i
I'm not sure this is a good way to do it, it just seemed logical to me. Anyway, when I try to run the program it just shuts down. I know this is the Sub that causes the program to crash because when I rem it out the rest works fine. I can't really see where the problem is so I'm starting to wonder if it's not the fact that I have a For loop in another For loop. I don't see why it shouldn't work but I'm out of ideas. Any help would be appreciated!
Thanks.