Combined AND/OR?

0 favourites
  • 7 posts
  • Not sure if im missing something, but isn't it possible to do AND/OR in same event level?

    Like

    Color = yellow

    Figure = Square

    • OR -

    Color = Red

    Figure = Square

    If not then it would be nice to be able to do <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think that you should be able to create a condition of any complexity by using system -> compare 2 values, and simply enter your condition into the expression box.

    Cheers,

    Greg

  • Yeah I agree with this.

    A half-workaround is using subevents like

    +Key "Z" is pressed

    OR

    +Sprite is touched

    --(Subevent)--+PlayerSprite is on ground

    --------------=Simulate player jump

    I think the one problem with this workaround though is you cannot place Trigger events like "On key pressed" inside a subevent.

  • My problem, well its not really a problem, I was just wondering if it was possible or whether I did something wrong :D

    Because I have something that needs to be check for whether its a weapon or not, if its not a weapon it should do something else, and in case its a weapon it needs to check if an equipment slot is free, and if its not it should just do the same as if it were not a weapon. And it would just be a lot easier to just make combine AND/OR conditions to check it.

  • Sure it would be nice if we could mix and/or, but the work around is fairly simple.

    Just get rid of the or, and have the and's in two separate events.

    You would have to duplicate the actions, but we have the function object that simplifies that.

  • Not sure if im missing something, but isn't it possible to do AND/OR in same event level?

    Like

    Color = yellow

    Figure = Square

    - OR -

    Color = Red

    Figure = Square

    If not then it would be nice to be able to do

    smileys/smiley1.gif" align="middle[/IMG] use families

    |-FamilyWithAllTheColors

    |---subevent:

    |-----figureA

    |-----or

    |-----figureB

  • Compare Two Values(Figure=Square && Color=Yellow) = 1(ie both are true)

    OR

    Compare Two Values(Figure=Squase && Colour=Red) = 1

    However I do agree that it would be nice to have AND conditions within OR. Maybe the Event shouldn't be a toggle between AND an OR, but instead it's

    Add OR condition.

    Color = yellow

    Figure = Square

    • OR - (right click event, add OR Condition)

    Color = Red

    Figure = Square

    • OR - (right click event, add OR Condition)

    Figure = Triangle

    Colour = Plaid

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