Object A collides with object B. I believe I'm detected the collision the correct way and am removing object B from its list but would also like to remove object A from its list. Any ideas?
' go through all the attacking missiles looking for a collided image
For Local A:AttackingMissile = EachIn AttackingMissilelst
CollideImage(A.anImage, A.x, A.y, 0, 0, 1)
Next
' attacking missile collides with a city
For Local B:Cities = EachIn CitiesLst
If CollideImage(B.anImage, B.x, B.y, 0, 1, 0)
PlaySound nukeSnd
AddExplosion(B.x, B.y, 1)
B.target = 0
End If
Next
' go through all the attacking missiles looking for a collided image
For Local A:AttackingMissile = EachIn AttackingMissilelst
CollideImage(A.anImage, A.x, A.y, 0, 0, 1)
Next
' attacking missile collides with a city
For Local B:Cities = EachIn CitiesLst
If CollideImage(B.anImage, B.x, B.y, 0, 1, 0)
PlaySound nukeSnd
AddExplosion(B.x, B.y, 1)
B.target = 0
End If
Next