Triggering animations correctly on platform games?

0 favourites
  • 13 posts
From the Asset Store
Game Triggers is as versatile as a Swiss army knife, and will be a great resource for any type of game you're creating.
  • 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.

  • 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.

  • 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.

    <img src="http://www.johnnysix.net/games/PlatformTest/EventSheet01.png" border="0" />

    Should I add 'every tick' to each of the events to ensure it's checked, or is this redundant?

  • You should try adding each animation to a non active group that only is active every tick when specific Boolean is true.

  • 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 slow

  • 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.

  • 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!

  • Does 'Setting up animation events' from page 6 of 'How to make a platform game' come in handy at all?

  • 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/

  • 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

    <img src="http://i165.photobucket.com/albums/u79/SketchDeluxe/screenshot367.png" border="0" />

    <img src="http://i165.photobucket.com/albums/u79/SketchDeluxe/screenshot368.png" border="0" />

    Attack:

    <img src="http://i165.photobucket.com/albums/u79/SketchDeluxe/screenshot369.png" border="0" />

    PD: Only animation "walk" have some frames

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Very cool , thanks for sharing, is that for your castlevania game?

    A contruct2 and a spanish lesson in one. :D

    I'll give it a play when I get home as I only have internet explorer at work.

  • Feel free to watch my code.

    The easiest way to achieve your challenge is using detectors and testing the right situations...

  • nice another CV fan =D All my projects always end up CV related lol

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)