In the game I'm working on (TDS), I'm having problems with the enemies shooting at the player. When the enemies shoot an instance of the bullet object is created at the enemy's x,y location which ends up blowing up the enemy in question. So, I'm wondering how I can create the bullet instance just in front of the enemy when the enemy can be facing any direction.
Sorry to post 2 questions in a row, they are completely different issues though.
In the game I'm working on there are bases that spawn enemies. The problem occurs when a spawned enemy finds it's way back into the base. I'd like to put some kind of object across the opening to the base that lets enemies out, but not back in.
Does anyone know of a tutorial or some example code that would show how this can be done?
In the game I'm working on enemies pursuing the player will in time get very close to each other and eventually touch. What I've done in the past was make enemies solid and have a collision event. No code was necessary in the collision event, just having it kept the enemies from overlapping each other.
In this game when the enemies touch they sometimes get tangled up with each other so that both are stuck and just sit there twitching.
Hoping to aid them in becoming unstuck I added the following code to the collision event: