PDA

View Full Version : help with top down shooter enemys, rotation...


aoi87
10-22-2003, 06:10 AM
Hey there wonderful actionscript community,

this is my first post here, I'm currently making my first game in flash in the vein of classic arcade shooters like 1942, aerofighters, raiden etc....

I followed a tute on scrolling shooters and now have an engine running a tiled background with a main ship (that shoots!) and enemy waves spawning from the top and moving downscreen.

my next step is to get some of the bad guys (either turrets or jets) shooting back at the players x,y position. and er, rotating

I followed the weapons 101 tute but I'm getting the feeling that I don't need something this complicated ( as it is intended to be for a game with mouse control, mine is keys)

now that I have the code from the 101 converted to follow the players ship it is behaving erraticly and not really tracking the players ship if its position is on the right(of the ship)

any ideas on how to easily understand the coding and trig involved here, so maybe I could rewrite this from scratch with a bit more insight to what I'm actually doing? I can post code if needed....

cheers,
Matt

annexion
10-22-2003, 06:22 AM
[crosspost]

aoi87
10-22-2003, 07:42 AM
sorry about that, there shall be none of that in future then..

an update:

I have gotten the turret to rotate and follow the craft with an easier way, (radials, atan2)

now I just need the thing to shoot a duplicate movie clip of the lasershot at my players ship....

suggestions appreciated?