Just for those not sure, here's a picture of an engine I'm working on for fun. Though I had to move the art aside just so I can iron out some bugs with it. Anyway.
While this may seem a simplistic problem, it's been bothering me for ages and I haven't found a solution to it yet. I've just stepped into the territory of coding enemy AI (Started out simple with a Robo-Scorpion enemy), with all the basic functions and such.
Now what annoys me most is that when I do get in the enemy's coded 'line of sight', it does it's part how it should. HOWEVER, it does not actually shoot out the desired projectile that I wanted it to. If I bind Fire 2 (Control) and code it to fire the projectile from the enemy, it works. Otherwise, it won't. Any solutions for this will be much appriciated (Along with a rep point. =P)
EDIT: For those very curious, the enemy's plotted out so far:
It's basicly a Bouncing Ball type enemy, set to only follow Left and Right movement (Player 4, who's controls are ignored), it uses two sensors to set a patrolling area. If the player happens to be in a range of the enemy (X position of Player (insert symbol) X of Enemy + 100), the shooting animation would pop up, on the 8th frame it would shoot out the projectile itself, and then continue the rest of the animation, going back to it's patrol route. Not entirely complicated.