8-Directions - 8 Different Animations

For questions about using Classic.

Post » Wed Nov 07, 2012 3:54 pm

I tried to search for this in the search engine, but it's becoming difficult to use now since Construct 2 stuff is so heavily mixed into the search.

I'm trying to do 2 things (2 separate .caps)



1. With each angle playing a different set of animations in one .cap

2. With each animation set having a mirror for it's opposite direction in the second .cap

I'm trying to give both the ability to work with the XBOX 360 controller and the keyboard.MrMiller2012-11-12 13:05:38
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Mon Nov 12, 2012 1:07 pm

Ini bawdy?
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Mon Nov 12, 2012 6:16 pm

Just wanting to check that you know if you Advanced Search you can choose which subforum you want to search. I haven't found very many Construct 2 things while searching the "Help Using Construct Classic" subforum.

Also you can seperately search through the old forum, which actually has a lot of useful and still relevant stuff:

http://69.24.73.172/scirra/forum/

I'm sorry I probably won't be much help anyways, but I can't really wrap my head around what you're trying to do. You have 8 directions, so you have 8 different animations for those... Are you just trying to invert the controls in the second cap? Why are they different animations altogether?
B
7
S
2
Posts: 123
Reputation: 1,061

Post » Mon Nov 12, 2012 7:58 pm

Hi Crowtongue,

I must admit that I just type in terms without using the advanced search. For whatever reason it just never occured to me to use it here even though I use it all the time on other forums

Anyway, it's not that complicated in terms of what I'm trying to do really. It's just 8-directional movement:

http://www.youtube.com/watch?v=0T-08YzX8PA

... but with each direction having its own animation group so that I can create different collision animations based on the direction. That would be one .cap

The second .cap would just be for animations that mirror based on the direction you press the arrow keys or XBOX 360 left thumbstick. In simpler terms, it would be similar to what you see in a 2D overhead RPG.

I've seen people use solutions where they separate the body and the feet and make the feet move based on 8 directional movement object, but that won't suffice for what I'm trying to do.

If I could just figure out what the expression is for this and how to attach it to degrees of an angle that coincide with the arrow keys and also works with the XBOX 360 left thumbstick...MrMiller2012-11-12 20:00:22
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Tue Nov 13, 2012 3:35 am

I figured it out. Once again I was overcomplicating things. All I had to do was:

This for the Keyboard

+ MouseKeyboard: Key Right arrow is down
Sub-Event = + MouseKeyboard: Key Down arrow is down
Action to Sub-event = -> Sprite: Move 10*TimeDelta pixels at 45 degrees
Action to Sub-event = -> Sprite: Set animation to "45 Down Right"


And this for XBOX 360 Controller

+ Xbox360Controller: (1): Left Thumb - Right is down
Sub-Event = + Xbox360Controller: (1): Left Thumb - Down is down
Action to Sub-event = -> Sprite: Move 10*TimeDelta pixels at 45 degrees
Action to Sub-event = -> Sprite: Set animation to "45 Down Right"

And I just change the angle of degrees to match which of the 8 directions I want, and then connect the key presses to an animation I've set in the Animator interface. Works perfectly!
B
12
S
4
G
3
Posts: 426
Reputation: 2,458


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests