How to do Condition1 OR(event1 AND condition2))

0 favourites
  • 7 posts
  • E.g.

    variable X = 9


    (button touched

    AND variable Y = 0) -> do a long list of actions.

    then have one list of actions.

    However, If I do the what appears to be right, then I have to duplicate the actions in both blocks (which is horrible).

    I havent worked out how to share a capx yet. I have dropbox, but the only option to share a folder it gives is to share with a specific person, not everyone. Below is a link to the file, but I really hope noone can download it otherwise everyone can see everything!

  • hey nutmix,

    once you have your variable X = 9 event, you want to right click on the whole box (not just the event) and "make it an Or block". Then you can add your second variable to it.

  • Genki is right for the use of the or block.

    But to be honest, with the example in your and_or capx, it makes absolutely no sense.

    Your parent event will only execute if the value of "a" is equal to 1.

    Than you would like as a sub event to check if the value of "a" is 0.

    As it is now, with no actions changing whatsoever the value of "a" is, it makes absolutely no sense.

    I don't know where you're going with it.

  • Sorry to bump an old topic, but I can't seem to do what he's trying to do either. To clarify, I'm trying to get the OR block to say:

    • Condition A
    • Condition B


    • Condition C

    but it won't let me group A and B together, it forces it into this:

    • Condition A


    • Condition B


    • Condition C

    I'm not sure if you guys read his question wrong or I'm reading your answers wrong, but I can't get that to work no matter what I do. <img src="smileys/smiley5.gif" border="0" align="middle" />

  • What about:

    -Condition A

    -Condition B

    -Condition C


  • Well hey, looks like that performs the same exact thing. Good idea! <img src="smileys/smiley36.gif" border="0" align="middle" />

    Although I tend to shy away from using else's, since in Construct Classic there was some obscure bug that ruined one of my projects for a week... or did the OR's do that? I DON'T KNOW WHO TO TRUST ANYMORE!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I could not get

    (Event A


    Condition B)


    Condition C

    to work, I so I altered the programs logic to work with

    Event A

    -- Condition B


    -- condition C

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