8-Direction Animation

Get help using Construct 2

Post » Fri May 06, 2016 2:38 am

G'day! I'm Reconnaissance, a beginner Construct 2'er.

I downloaded the Battlefield Sprite pack and I'm using the tank animation strip to create a small two player game.

Is there anyway too automatically apply the animation strip to 8-direction behavior?

If you could respond ASAP, that would be highly appreciated as I am eager to learn.

Cheers
-Reconnaissance
B
10
S
3
Posts: 8
Reputation: 658

Post » Sat May 07, 2016 1:57 am

I don't know how does that sprite pack look like. A link would be nice. So I am assuming you have an animation for each 45 angle for your sprite. (Correct me if I am wrong.)

But I believe you will need to use events to apply for all those animations you want. For example, for each 45 degrees angle of your animation strip, you could create animation named "player1_0", "player1_45", "player1_90", ... , "player1_315". Then, from the player's input (touch, keyboard, etc.), you set the animation with respect to the input. For example, if player is heading toward the right, set animation to "player1_180".

This is the gist of it but of course, there is also animation speed you need to take care of. For example, if player stops moving, set animation speed to 0. If player moves, set animation speed to more than 0. (You need to find a sweet number with respect to how your animation looks)
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,469

Post » Sat May 07, 2016 2:54 am

Message: Reconnaissance can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
TwinBlazar wrote:I don't know how does that sprite pack look like. A link would be nice. So I am assuming you have an animation for each 45 angle for your sprite. (Correct me if I am wrong.)

But I believe you will need to use events to apply for all those animations you want. For example, for each 45 degrees angle of your animation strip, you could create animation named "player1_0", "player1_45", "player1_90", ... , "player1_315". Then, from the player's input (touch, keyboard, etc.), you set the animation with respect to the input. For example, if player is heading toward the right, set animation to "player1_180".

This is the gist of it but of course, there is also animation speed you need to take care of. For example, if player stops moving, set animation speed to 0. If player moves, set animation speed to more than 0. (You need to find a sweet number with respect to how your animation looks)

Here is the link to the pack: new-sprite-pack-battlefield_t63450
I'm using the TankHeavyA if that helps as well.
Thanks for the help, I'll look into it!
B
10
S
3
Posts: 8
Reputation: 658


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests