Triggering animations correctly on platform games?

Get help using Construct 2

Post » Tue Mar 27, 2012 4:04 am


I made a quick example - click image to play. [ Download CAPX here ]




I sort of have things working, but I'm curious to know the approaches you guys take when setting things up. Right now I'm using a series of variables to test when it's doing what, and assign/trigger the appropriate animation depending on their combination.

Is it to do with the input method itself?

For example, the "duck-walk" - It works if you mash down and right/left simultaneously, however if you are holding left, then press down, it doesn't trick, same with the crouch animation, it works if you're mashing left or right, but maintains the idle anim if you just press down.

JohnnySix2012-03-27 04:09:14
Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Post » Tue Mar 27, 2012 4:48 am

I think what your looking for is

(On Key Down)

You are your using

(On Key Pressed)

difference

On Key Pressed = one tick

On key down = multiple ticks

so for crouch

(on Key Down)=Shift > Stop Animations (stops Current Animation)
                    > Set animation to "Crouch"
                    > Set Speed (to your liking)
                    > Start animation From "beginning"

                    > if needed stop other groups that handle other controls or moves until this ones complete add a wait delay for example below.


Example 2:


Shoty ex by N7Effect, on Flickr


Reload ex by N7Effect, on Flickr

In my example above for Reloading I don't want 'anything' to get in the way of my character reloading until it's end. What you don't see is another group that handles my global variables of ammo. Once the player has shot the gun two times the global variable shuts down the group that allows player to shoot and enables the group allowing reload of weapon. Once weapon Reload animation is complete, Groups go back to default.
                    
Erndog2k2012-03-27 05:03:26
B
27
S
11
G
1
Posts: 246
Reputation: 5,048

Post » Tue Mar 27, 2012 9:13 pm

In this example ( and for a game I'm working on) I need to use down arrow to trigger both crouch (when stopped) and duck walk ( when moving and on the floor)


I am using "on [key] down" - here's a shot of the event sheet from the CAPX attach in the OP.



Should I add 'every tick' to each of the events to ensure it's checked, or is this redundant?
Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Post » Wed Mar 28, 2012 2:27 am

You should try adding each animation to a non active group that only is active every tick when specific Boolean is true.
B
27
S
11
G
1
Posts: 246
Reputation: 5,048

Post » Thu Mar 29, 2012 4:47 pm

This sounds a lot more complex than previous game editors I've worked with.

In this example I've managed to get the duck-walk working reliably, but some things are off.

Example of the flawed animations in the actual game. [ Click Here ]

Recent Animation test - no working crouch/ladded animations [ Click Here ]


CAPX , minus turtle.

Controls are arrows, in the animation demo, SPACE causes time to slowJohnnySix2012-03-29 16:47:48
Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Post » Sun Apr 01, 2012 11:48 pm

Has anyone had success in getting several sets of movements all in one?

I'd be curious if anyone is willing to share a CAPX, just to see how others have handled it.

Perhaps it's something that will be supported in future by construct- further platform movement events like "is crouching" , "is walking against wall" etc.

Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Post » Mon Apr 16, 2012 6:58 pm

This is great! I'm working on a platformer and I'm having trouble setting a few of the animations.
I'll have a better look at it tonight!
B
106
S
40
G
10
Posts: 456
Reputation: 13,152

Post » Mon Apr 16, 2012 7:46 pm

Does 'Setting up animation events' from page 6 of 'How to make a platform game' come in handy at all?
Scirra Founder
B
357
S
214
G
72
Posts: 22,946
Reputation: 178,298

Post » Mon Apr 16, 2012 9:42 pm

It's helpful for the basics- I was just curious how people approached movements or behaviours that aren't encompassed by the platform movement trigger events, crouching, duckwalking, ladders and such, and ensuring triggers are consistent.


This was the early test where duckwalking isn't triggered unless you're landing and moving.

http://www.johnnysix.net/games/PlatformTest/

This later version does trigger it , so it should work from standing (and adjust speed so you move slower when duckwalking

http://www.johnnysix.net/games/AnimTest2/
Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Post » Tue Apr 17, 2012 1:24 am

Hi

I had a lot of problems with animations, but I did this, maybe this pics could help you.


Z is Sword, X is Cross.

Caminando is Walking
En_Suelo is Stop (Stand up)
Saltando is Jumping
Espada is Sword (Atk 001)
Subarma is Cross(Atk 002)
Agachado is Crouched







Attack:



PD: Only animation "walk" have some framesSketchDeluxe2012-04-17 01:28:43
B
66
S
13
G
7
Posts: 11
Reputation: 7,513

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests