Directional Movement

I’m trying to make an overhead shooting game (anyone who has played 1942 or Galaga will know what I mean). I have the basics down, but I need to make the enemies be able to shoot in the direction of the plane (the MC the player controls).

Here’s how it works - the plane, lasers, and enemies all fly via Action Scripting, and there is a constant series of loops that check for collisions between objects. In one of those loops is a timer that makes enemies “fire” at the player completely at random. When the enemies fire, it duplicates an MC. All this works.

The problem is that when the enemies fire, I want them to fire in the direction of where the plane is when the enemy fires. My initial tactic for this was to make variables inside each duplicated MC of the enemy’s bombs. But there is no time that I can set up these variables, because they are duplicated off screen (making the on (Load) structure useless). The enemy units they are fired from (where the loop that generates the enemy’s bomb is) would be the perfect place to set up these variables, but I can’t access member variables of an MC through another MC.

So how can I set up a directional firing mechanism with a duplicated MC?

bump

:geek: