PDA

View Full Version : Moving movieclip between preset waypoints.


Durandir
10-26-2009, 06:51 PM
So, I am completely new to Flash and AS3, so I have been following numerous tutorials I have managed to learn some of the basics. I still have much to learn though, and I cannot seem to find tutorials for some of the things I want to learn.
I want to create a Tower Defense game (yes, I know that might be a bit to ambitious for a newbie, but I want to try and learn enough to do it).

Right now I have a working preloader, menu, and a level with a path on. In the Level1 movieclip I got four waypoints, instanced wpS, wp1, wp2 and wpF. Those are the start, 1, 2, and finish waypoints.
I got a creep which I want to place on the Start, then move to 1, 2 then Finish. But I have absolutely no idea how to do it. I have been trying to make it appear on the Level1 movieclip I got, but I just cannot wrap my head around how. And there there is the matter of making it move...

So does anyone know of a good tutorial or something for AS3 when it comes to making this kind of game? Or can anyone help me a bit here? I know what I want to do, and I almost know how to do it, but I just cannot translate it into script!

I guess I need to put my Creep clip in an Array, so that I can have many of them appear after each other. Then I need them all to move from one waypoint to another.

(I use FlashDevelop, and by now I have a few .as files. This also makes this hard for me as a newbie, 'cause I don't know what I should put where. Should the Array be put in the Creep.as, then I put the code for spawning the creeps in the Engine.as? And I use the preloader method of having my clips in an asset clip, so that they do not load before my preloader... I know I can learn this with some help :P )