Mouse and keyboard: set control state help

This forum is currently in read-only mode.
  • Hello, what exactly does the set control state of the mouse and keyboard object do? Im using the following actions with the platform behavior, but it doesn't appear to be doing anything.

    Always - MouseAndKeyboard - set control of player 1 to 0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The Mouse & Keyboard object is a very powerful set of commands that you can access though Event sheet editor. It tests for what mouse buttons were clicked, cursor moved over, key presses, etc.

    Look Event sheet editor and you can see all it does.

  • Actually the control states are defined in preferences, down at the bottom. You can use the predefined ones like "Move Left(p1)" or define your own.

    Something like:

    + MouseKeyboard: Player 1 "Move Left" is down

    -> Sprite: Set X to Sprite.X+1

    Would move sprite to the right instead of to the left, or how ever you want it.

    Note: you can also use control states as Boolean comparisons, as either 1 or 0.

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