Is it possible to add conditions to an "or" block?

  • Is it possible to have an "or" block listing events with conditions added.

    For example:

    event

    or

    event with 1 condition

    or

    event with 2 conditions

    It seems to only allow a single event/condition per "or".

  • I believe subevents may be the way to go?

  • How would I go about doing that? Should I make the "or" event (the one that I want to add the conditions to) have no actions on its own and then add a sub event with the conditions?

  • There are two things to consider in an or block, the logical TRUE/FALSE and the objects it picks (feeded to the actions).

    For the the logical TRUE/FALSE, an or block is the same as the conditions seperated with a copy of the actions.

    (yes i know its more code). If you are not picking objects, yes plz use an or block. And no, it dont accept an AND middle in the OR.

    For the picking, if the or block contains a second condition picking the same object, then its starts from what is previous picked in the first condition picking that object. It will then happen that the logical TRUE/FALSE is correct but that there will be no objects feeded to the actions, due an empty picklist.

    If you dont think an or block really trough, you are better of anywayz with a block for each condition and duplicated actions.

    My 2 cents.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are two things to consider in an or block, the logical TRUE/FALSE and the objects it picks (feeded to the actions).

    For the the logical TRUE/FALSE, an or block is the same as the conditions seperated with a copy of the actions.

    (yes i know its more code). If you are not picking objects, yes plz use an or block. And no, it dont accept an AND middle in the OR.

    For the picking, if the or block contains a second condition picking the same object, then its starts from what is previous picked in the first condition picking that object. It will then happen that the logical TRUE/FALSE is correct but that there will be no objects feeded to the actions, due an empty picklist.

    If you dont think an or block really trough, you are better of anywayz with a block for each condition and duplicated actions.

    My 2 cents.

    Could else be useful with subevents in this situation? Or even just multilevel subevents successively comparing against different sets of events?

  • Dont think so, Construct mostly does not do 'if this,then that'.

    I will bring even more confused people.

  • Dont think so, Construct mostly does not do 'if this,then that'.

    I will bring even more confused people.

    How about using inverted events to negate the statements that don't want to be considered in separate events?

  • Same thing Zebbi (in my eyes), i see always the Two Same Things.

    1/ A lot of poeple doe things like this, for example. In the first event they check if something moves right an some other condition. If true they set it to move left. In de next event they check if it moves left (forgetting that in the previous event they made it move left)

    So, they make two events in a row, and the first event makes the second always true.

    2/ At the same time (especialy in OR blocks) they pick some objects. In de next (same level or sub level event) they filter those picked items in a way that the condition is true, but there are no objects left in the picklist to feed the actions.

    It is usaly not a case of construct having a flawed event system. It is usaly not carefully coded. In a lot of cases you are better of with two seperatly events then with an or block. The or is mostly lazy coding, because you dont have to duplicate the actions. Althaught, less event should be encouraged, i know.

    So, in my opinion, allowing ANDs in an OR block will get even more poeple confused, when they seem to be confused allready. But i am guilty too, i still fall in those traps. I dont need more traps.

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