Simple Operator Question

0 favourites
  • 5 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I've been using Construct 2 for quite a while and I can't believe I don't know how to do this, but does anyone know how to create an event statement that functions as

    If "Global variable" = 1 OR 2 OR 3 OR 4

    im trying to figure out how to accomplish an event statement that included multiple values for a certain global variable

  • Logical Or is the pipeline symbol " | " (Y)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've tried the statement

    Day=0

    If Day = 1 | 2 | 3 | 4

              Then Go to Layout "gameday"

    But it only works when day=1 and never 2 3 4

    Am i doing it wrong?

  • Those operators are meant to be used inside expessions and not really that useful in this case.

    You can make an event block into an OR block by adding two conditions (in your case 4), then selecting the event block and pressing Y on the keyboard. (or right click)

    You could also check if the variable is less than 5 by adding a "System -> Compare variable" condition and selecting "Less than" in the dropbox.

    There are many ways to do it, but those should do the trick for you.

  • I Never knew about the or block function!!

    Thank you!

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