How Would I make a or ?

0 favourites
  • 4 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • How would i make something like this?

    I want to make this so my code can be cleaner

  • If i have lots of cases i generally do something like;

    Set boolean to false

    blank = blank

    this = this; set boolean to true

    that = that

    var = var; set boolean to true

    boolean = true; do stuff.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It sounds like you want to use an event with "OR" with a sub-event that is also an "OR".

    So all events are, by default, AND events. If you right click (or two finger tap on a touchpad) on the event's conditions, you can see a button that lets you "Make OR block". This changes that particular event from AND to OR as long as you have multiple conditions in it.

    Then you can right click/two finger tap again and "Add sub-event". This event will only trigger once one of your original OR conditions is true and everything in the top level event has run. So you make this sub event another OR block and then run your code in the sub event.

    Is this what you meant?

  • Though that might result in situations where your event triggers on undesired combinations.... hmmm.

    I think maybe then using an "And" event with the specific combination that calls a function to do what you want is what you'd do here.

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