Gamepad conditions and sub-events problem

0 favourites
  • 5 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • Hi ! I tried adding gamepad controls to my game, but sub-events won't work with the "is button down" condition for gamepads. It feels like its a while, and so only the directly linked actions will activate and none of the sub-event...

    My code :

    CONTROLLER : Button D-Pad left is down -> Player 2 : Platformer Simulate control left

    SUB : SYSTEM : V_IsP2Right >= 0

    and -> Set Platformer speed to 166

    Player 2 : Platformer is on the ground

    It works fine with the keyboard condition "key is down" but it won't trigger the sub-event with the gamepad... Any idea ?

    Thanks and sorry for the (probably) bad translation of construct events, I don't have the English version

  • My code isn't clear : I got 2 sub conditions (is platform on the ground and is V_P2Right >= 0) and the action is to set the speed to 166

  • Try running the game in Debug Mode (Shift+F4) and check if V_P2Right variable has the correct value. If this doesn't help, consider sharing your project file, or at least a screenshot of the events.

  • Yup V_IsP2Right has the correct value :/ Don't know why this happens

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So what exactly is the problem? When you press left on the d-pad, the player moves left, but the speed doesn't change? Or it doesn't move at all?

    Does it work when you press Q on keyboard?

    There may be some mistakes in other events which you didn't show in the screenshot. Can you post your project file?

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