Using both AND and OR Boolean in an event

0 favourites
  • 3 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • I'm trying to set up certain animations to take place when individual and multiple buttons are pressed. When a single button is pressed, one animation will occur. But when that same button plus another is pressed together, a different animation will happen. What I want to do is test for different instances of conditions for the same possible event. It would go something like this:

    ==============

    | CONDITION 1

    | [AND]

    | CONDITION 2

    |

    | [OR]

    |

    | CONDITION 1

    | [AND]

    | CONDITION 3

    --------------

    | --> EVENT 1

    ==============

    I'm basically wondering if it's possible - in some way - to set up a combination of Boolean conditions to result in the same event.

    I've try setting up groups - something I apparently need to learn more about and how they function - but that hasn't yet solved my current problem.

    My THINKING would result in something like this:

    ==================

    | CONDITION 1

    | GROUP

    | - CONDITION 1.1

    | - CONDITION 1.2

    ------------------

    | --> EVENT 1

    ==================

    Does that make sense?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • C2 doesn't support nested-mixed-booleans. Either use local variables for the two AND conditions, and then do an OR, or in this case, both are checking CONDITION1, so just check that first, then add a sub-event for the OR check.

    If Condition 1

    -> if Condition 2 OR Condition 3

    ---->action

  • blackhornet

    THANK YOU! That pretty much solved the present dilema... I'm just glad I already had figured out how to insert sub-events (that indented black line with the arrow showing where the event is being sidled into). I think I had something similar in mind at ONE point while trouble-shooting, but yeah, I believe this is the solution I'm ultimately looking for (until nested-boolean comes around).

    I appreciate your feedback. :)

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