Help me with a Scorched Earth-like game!

I am making a game somewhat similar to Scorched Earth in Flash MX 2004. What I need help with is making a gun who’s rotation is controlled by arrow keys.

This is as far as I have gotten so far but I will definately need further help once this step is completed.

I just need script to make the gun rotate at 10 degree intervals and keep track of its position with a variable.

After this I will make different weapons to be fired out of the gun.

Just have an mc that’s a turret and put this code in.

//keep track of position
//to rotate the turret…
if (Key.isDown(Key.RIGHT)){
if (Key.isDown(Key.LEFT)){

remember to put the movie clip origin on one side of the turret so it rotates correctly.

Here you go. Hope this is what you meant.


aahh moopers beat me to it. shakes fist at moopers ^.^

heh heh heh

Wow, thanks Moopers! I would give you a dollar!

If the attacher thing works, than here’s what it looks like so far.

I’ll post again once I’m finished making the power control bar.