How do I Create OR block

0 favourites
  • 11 posts
From the Asset Store
Background Story generation templates. See the Arcade demo.
  • Hi i know how to create Or block, but it doesnt work as i would need, it separates every condition. What i need is 3 conditions OR another 3 conditions. is it possible?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That is how Or works. You could use 2 subevents depending on what you trying to do it should work

  • I have not experimented with any logic more than simple if x = y kind of commands as yet. Someone else might have a more elegant solution.

  • I would need something like this

  • There's no way in C2 to create an or-block like that. It seems like an arbitrary limit, and I'm unaware of why the limit exists.

    One way around it is to split your groups of conditions into separate events with duplicated actions, using an else at the beginning of each event after the first to prevent the same actions from running more than once. Another is to simplify your logic. For example, in your picture you have:

    (Platform is falling AND is doubleJump) OR (Platform is jumping AND is doubleJump)

    which is logically equivalent to:

    Is doubleJump AND (Platform is falling OR Platform is jumping)

  • Thank you linkman2004 , this look like good alternative.

  • While were on topic on the 'Or' I question this logic let say if you need A+B=C or A+D=C instead of creating two event for the same outcome we really need A+B or D = C. Have you brought it up to the creator because i once was able to do this but i cannot figure out how i was able to do it.

    Because in many puzzle like game being able to be flexible in how you decide makes the content a bit fresh and user friendly controlled instead of Master game only.

  • While were on topic on the 'Or' I question this logic let say if you need A+B=C or A+D=C instead of creating two event for the same outcome we really need A+B or D = C. Have you brought it up to the creator because i once was able to do this but i cannot figure out how i was able to do it.

    Because in many puzzle like game being able to be flexible in how you decide makes the content a bit fresh and user friendly controlled instead of Master game only.

    You could do

    [attachment=0:2xbnip7l][/attachment:2xbnip7l]

  • If i'm not mistaken then this is what you're looking for.

    At least i think it would work in your case.

    [attachment=0:2z8klq0w][/attachment:2z8klq0w]

    I know that it's not possible to have 3 seperate conditions within an OR block with another 3.

    But i'm sure you can work it out using a different way using sub events.

    Because actually you should never require multiple checks within one Or block.

    Because that can always be added at the top as a first check before going to the actual OR block. (as you can see in the example above)

    So if you require any more AND checks, just at them add the first sub event.

  • thank you guys, got it working

  • Ashley, it would be really usefull if you could add the functionality to make the or between more then one event, in some cases the workaround gets ugly when it just doesnt have to

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