How to I have an "A or (B & C)" condition in an event block.

0 favourites
  • 2 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • I'm trying to make my touch UI support game controllers.

    Currently each UI button is actioned using "on tap" which works for touch and mouse.

    I've created an array that maps each button to the next button the cursor should move to if the gamepad d-pad is moved left/up/right/down.

    When the cursor moves, it sets a global variable ("UIButton") to the name of the button it's moved to.

    So what I want is:

    on tap "buttonX" or (on gamepad Button A pressed & UIButton = "buttonX") -> do something

    But I can't figure out how to do it in event blocks. Feels like it should be obvious and I'm dumb.

    Don't think I can use "evaluate expression" with triggers.

    So the only other way I can think is to create functions for all the "do somethings" and call them in separate triggers (one for touch/mouse & one for controller/keyboard).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think usually mouse and gamepad are separate events and it makes sense here to have 2 events.

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