How do I lock jump direction in platform behavior

0 favourites
  • 3 posts
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • Platform behavior allows you by default to change the direction while in air, either jumping or falling.

    I will like to have like in fighting games a jump that once the players imputs the direction of it, cannot do anything but attack

    until the character lands, no direction change possible.

    Im thinking about disabling platform behavior once the input is done or something like that but after several tries I still without the optimal

    approach for this, any ideas guys?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmmm?

    I would use a global variable as a trigger to keep other direction keys from being used and only make the other direction keys work when the platformer is on the platform.

    Global variable OnPlatform=0

    On Key Down: Move Player Left

    OnPlatform=1

    Player On Platform: Set OnPlatform=1

    On Jump Pressed: Set OnPlatform=0

    Something like that.

  • I see, thanks for the help, will try it for sure

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