How do I Change animations depending on its action

Get help using Construct 2

Post » Sun Mar 16, 2014 4:41 pm

Hey, i was just wondering how i could change animations depending on what the character does. In this case i would like a different animation when i jump, does anyone know how i could do this.

Also does anyone know how i can stop this: (video bellow), Also the jumping system is not very responsive :/

Code: Select all
youtube.com/watch?v=EZFLazlKfwM
B
1
Posts: 4
Reputation: 133

Post » Sun Mar 16, 2014 6:09 pm

I can think of a couple of ways to do what it sounds like you want to do.
If it is an animation that is done in response to an event then (in your event sheet) you can call the "Set Animation" action of the sprite you want to animate when the event happens. From that action, you can specify which animation you want to run. You can create multiple animations for a sprite and name those animations using the "Animations" window that pops up when you double-click a sprite in the properties window.
If it is a repeating event (like a character tapping their feet because they are waiting for the player to move them) then create a variable to enables you to track the status of the character ("running", "walking", "waiting", etc.) Set this variable when you need to, and then call "Set Animation" to play the animation that is desired based on the status tracking variable.

I've never done a running game so I can't help with your other problem.
B
5
Posts: 11
Reputation: 272


Return to How do I....?

Who is online

Users browsing this forum: beohs, bilgekaan, Elliott and 17 guests