I'm making a platformer and I've ran into a weird bug. I have an enemy which behaves pretty much like Mets from Megaman series. Once the player gets close, it opens up for attacks and fires 3 bullets.
The problem I have is, sometimes they won't fire at all. Few instances of the enemy will just open up and take damage once I get close, but will never fire at me. There is one specific instance that fires when I'm playing, but if I reach the first checkpoint, die and respawn there, it will not fire at me.
Anyway, before I give any code, is there any way to check if the bullets are even being created? I mean, they are either not being fired at all or they destroy themselves upon creation and knowing which is it, may help me find the bug
Either way, I don't think it matters because it does work for some enemies and not for others.
Enemy firing the bullet action and changing sprite action are both in the same block, and animation plays, so bullets should be fired as well.
But bullets get automatically deleted when they are too far from the player. For the enemies that don't shoot, I'm sure the player is not far enough to make them go away. It's the same distance for pretty much all enemies and works for few, and doesn't for some others
Edited by Gral92, 29 April 2012 - 06:22 PM.