Cinematic Platformer Tap Movement Button

  • Hi! I'm making a cinematic platformer and I've stumbled a little problem:

    Since I'm making a cinematic platformer I wanted to make it so that when you stop, your character will gradually stop moving, to do this I made 2 extra animations: 1 for when you release the move key on the right foot, and one for when you release the move key on the left foot. What the game does is that it when you release the move key, it will check the frame of the current animation (walking or running) and then play one of the to accomodating animations, depending on which foot you land on. This is fine and dandy but here is where things get a little tricky:

    See, when you release the button and the game checks for the next right/left step frame, it will automatically play one of the accomodating animations, this leads to the nasty problem that you can't tap the move button to continue the normal walk/run animation without it continuously restarting one of the accomodating animations (because you also repeatidly release the button, see where I'm getting at?).

    I know it might sound really confusing so here is the project file so that you can see the scripts and animations for yourself, you can find the movement script in the 'controls' event:

    If someone knows a way to this problem, I'd be really greatful! Thanks!

  • Try Construct 3


    Try Now Construct 3 users don't see these ads
  • Cinematic platformers are very specific with their mechanics. Character always moves on grid and animations are made to give an illusion of smooth movement. Look at Flashback, Blackthorne, Another World.

  • My character doesn't move on a grid so I don't have the luxury of waiting for animations to end.

    I also noticed another thing, in the script, the part that I've highlighted never gets to run, any idea why? Replacing the frame check with "isAnimationFinished" doesn't make a difference.

  • I thought up a little work-around.

    What I did was that I made it so that when you release the button, the game would wait for just under 1 sec, enough time for the accomodating animation to finish, and when it was done, you can move again. It's not super elegant but the animation don't stutter anymore when tapping, and it only becomes a hassle when you go crazy on the move button, I don't expect anyone to tap-move anyway so. Unless someone comes up with a more elegant solution, I'll keep this for now.

Jump to:
Active Users