How do I implement a simple landing animation for platform game?

0 favourites
  • 3 posts
From the Asset Store
Ninja char for your game! Make your own Shinobi game with this art.
  • Hey guys,

    I'm sure this has been answered a dozen times - apologies, as I can't find an answer that is helping me currently - I'm looking to simply have a single frame landing animation upon my character landing.

    The animation is technically one frame - all other animations work fine (idle, jump, fall, run), but land just isn't.

    All of my animations are triggered by the Platform conditions - I would appreciate any input. Thank you guys!!

    Here is an example of my player movement:

    [PLAYER MOVEMENT]

    ----[DASH]

    --------+ Keyboard: On D pressed

    ---------> PLAYER: Set Platform maximum speed to 2000

    ---------> PLAYER: Set Platform acceleration to 2000

    ---------> System: Wait 0.2 seconds

    ---------> PLAYER: Set Platform maximum speed to 150

    ---------> PLAYER: Set Platform acceleration to 430

    ----+ PLAYER: Platform is on floor

    ----+ PLAYER: Platform is moving

    -----> PLAYER: Set animation to "PLAYER_RUN" (play from beginning)

    ----+ Keyboard: On ← pressed

    -----> PLAYER: Set Mirrored

    -----> System: Create object dust on layer 3 at (player.X, player.Y)

    ----+ Keyboard: On → pressed

    -----> PLAYER: Set Not mirrored

    -----> System: Create object dust on layer 3 at (player.X, player.Y)

    ----+ PLAYER: Platform speed = 0

    -----> PLAYER: Set animation to "PLAYER_IDLE" (play from beginning)

    ----+ PLAYER: Platform is jumping

    -----> PLAYER: Set animation to "PLAYER_JUMP" (play from beginning)

    ----+ PLAYER: Platform is falling

    -----> PLAYER: Set animation to "PLAYER_FALL" (play from beginning)

    ----+ Keyboard: On ↓ pressed

    -----> PLAYER: Fall Platform down through jump-thru

    ----+ PLAYER: Platform On landed

    -----> System: Create object dust on layer 3 at (player.X, player.Y)

    ----+ Keyboard: On D released

    -----> System: Set group "DASH" Deactivated

    -----> System: Wait 1.5 seconds

    -----> System: Set group "DASH" Activated

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Realized that I don't have the info pertaining to the landing animation in the attached info -woops- This is how the land condition reads:

    ----+ PLAYER: Platform On landed

    -----> System: Create object dust on layer 3 at (player.X, player.Y)

    -----> PLAYER: Set animation to "PLAYER_LAND" (play from beginning)

  • Is the dust created on landing? If if is, then your event is working correctly. The "PLAYER_LAND" animation is most probably starts playing, but then immediately replaced with another animation, idle or run. There are a few ways to fix it, for example you can set a boolean variable isLanded=true, and then after a small delay isLanded=false. And add a condition "isLanded is NOT set" to other events.

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