00:00
00:00
Newgrounds Background Image Theme

Em0-Snail just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Dynamic player animations (AS3)

482 Views | 2 Replies
New Topic Respond to this Topic

Dynamic player animations (AS3) 2013-08-26 21:57:44


I'm making a platformer and I want the player to be able to have different power-ups, and combinations of those power-ups.

I want to add the items onto the player (Right now it's a MovieClip) any time I want and in any combination, without having to make animations for every combination. Is this possible?

I've tried Google but I don't really know what to look for.

Response to Dynamic player animations (AS3) 2013-08-26 23:29:54


At 8/26/13 09:57 PM, DANNY135 wrote: I'm making a platformer and I want the player to be able to have different power-ups, and combinations of those power-ups.

I want to add the items onto the player (Right now it's a MovieClip) any time I want and in any combination, without having to make animations for every combination. Is this possible?

I've tried Google but I don't really know what to look for.

I'm guessing it moves along the player like an equipment.

You can. The problem is how to specify the position on each animation frame. I pulled that out by adding empty movieclips that animate along with the animation. When you want to add something, add into those movieclips instead.

Response to Dynamic player animations (AS3) 2013-08-27 05:54:17


That really depends on what power-ups you want to have and how they affect the appearance of the character.
It depends on particular examples. Do you have anything specific in mind?

And yes, movie clips for displaying equipment is a common way to go. Movie clips can be shown or hidden, without affecting the rest of the animation. You could make a new animation for each combination of power-ups, but it's lots of work.

If your animation is frame-by-frame, you need to draw the equipment on every animation (or just do it like a Madness movie animation - using sprites) and organize the equipments relatively to each other (and character), so that they can be displayed simultaneously. And then use movie clips to hide/show the equipment. Or switch frames, if, for example, there are many types of swords, helmets, shoulderpads and they all have same animations.

If you want the same equipment to be displayed the same way on all animations of the character (to minimize the work), then it's treated as a special effect which follows the player. In this case you should put the special effect animation in front and behind the player into 2 movie clips that appear respectively in the game, and then make those clips smoothly appear/disappear and play their looping animation while the power-up is in effect.

Making special effects in games is tough work. For example, if you want an orb which spins around the right hand, you need to go into the hand movie clip and animate the effect there. And then turn it on/off during the game. If your animation is drawn frame-by-frame, you need to organize in-front and behind movie clips for the hand drawing in each character animation frame and put the special effect animation into those 2 clips: in-front and behind. And then turn it on/off for 2 clips. (Animation for the effect is always same, regardless of the arm position.)

It also depends on how you want the effect to visually appear. You need to be more precise, please?