How do I invert movements?

  • Hi all,

    in my game I want to add a power up (or curse) which will invert the movements of the player (only left and right) for a small amount of time and then the movements will go back to normal. The player has the "platform" behaviors.

    Any help?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your platform behavior needs not to have the "Default control" property to yes.

    You need to have a keyboard plugin added to your project.

    You need to have a Timer behavior added to your main character.

    You need two groups of events that serve as "inputs". One regular where each key down does simulate the correct control, one "Invert" where controls are inverted.

    On collision with the Curse, you deactivate the regular input group, activates the invert group and run the timer for the amount of time you want the controls to be inverted.

    Then when the times runs up, you activate/deactivate the input groups accordingly and you are done.

    See this example capx made in r203.

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