Action script

Oki doki.\r\rHere’s my problem.\r\rI’ve created my first little game [lame-o ship-shooter thingy], and I have all the actions working fine for the most part, what I need help with is some code to do this:\r\rWhen the spaceship movie clip moves up, the enemy movie clip should move up as well [follows the spaceship up/down]… it’s probably simple, but my attempts, well yeah. This probably isn’t enough info, but it’s worth a shot!\r\rThanks.

put an onclip(enter frame) on the ennemy that checks the spaceships _y all the time in an if-clause, and if it changes, modifies its own _y too.

Be careful though… if the enemies objective is to crash into the player’s ship, you’ll be right on the money… but if the players objective is to avoid the enemy, he wont be able to do so.\r\rEnemy movement is very tough in games, I’m finding. I created a pong game (my first real game in flash) and my computer controled opponant NEVER misses the pong ball. It’s great for training, but it’s very frustrating…