Question: Can I use Collisions for an entity that doesn't exist yet - like a bullet?
What's wrong with my code then?
By the way, 3 is the bullet's type for collisions.
Also, about mindstorm's method... I don't see how that prevents weird things from happening when 2 things collide at once because Blitz will check one thing at a time, even if you do it the old-fashioned way. Also, since you use n = 1 to CountCollisions(entity), wouldn't that mean that if the player collided with only the wall, CountCollisions would return 1 because the player only hit the wall, but then if a bullet's type is 1 and the wall's type is 3, the player would run into the wall and act like he hit a bullet? I don't see how that method works at all, because it cycles through numbers, but the numbers don't necessarily stand for what the player hit.
What's wrong with my code then?
For bullet.bullet = Each bullet entitycollision = EntityCollided(player2\sphere, 3) If entitycollision > 0 FreeEntity bullet\entity Delete bullet Return EndIf Next
By the way, 3 is the bullet's type for collisions.
Also, about mindstorm's method... I don't see how that prevents weird things from happening when 2 things collide at once because Blitz will check one thing at a time, even if you do it the old-fashioned way. Also, since you use n = 1 to CountCollisions(entity), wouldn't that mean that if the player collided with only the wall, CountCollisions would return 1 because the player only hit the wall, but then if a bullet's type is 1 and the wall's type is 3, the player would run into the wall and act like he hit a bullet? I don't see how that method works at all, because it cycles through numbers, but the numbers don't necessarily stand for what the player hit.