In this game I am adding enemies who shoot globs of poison, and they are working well, however an odd bug has arisen with the way I handle removal of enemies using the destroy command.
To get this bug to occur here are the conditions.
- A glob of poison must be on the ground.
- You must kill every enemy who can shoot the globs of poison.
- When the timer runs out for poison being on the ground, the game will crash, assumedly due to the enemy.die() method I added which is basically just a weird way to call the enemy.destroy() method to get rid of it. However no other enemy in the game has caused this sort of bug.
*Additionally, if there are 3 globs of poison on the ground, and the poison spitting enemy is dead, only the final glob of poison to be removed will crash the game.
Controls: WASD: Movement___E: Inventory___L-CLICK: Equip Item / Use Item
idle.html (65.8 KB)