How do I compare variables like =1 through 50 only..?

0 favourites
  • 5 posts
From the Asset Store
You think you can guess the character’s name?! Then let’s see how smart you are!
  • Gosh I make so many weird posts haha.

    How do I compare a variable based on a set of numbers? instead of saying = to or < 50 I would like to put something like = to 50 through 100.. so any number between 50 and 100 is acceptable.

    The reason I ask is because I want to have a scale of 1 through 100 and I run in to problems when I have three or four <numbers on that scale.

    Thank you!

  • Just use two conditions:

    Make the first one:

    System:variable >= 50

    then 'Add another condition':

    System:variable <=100

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just use two conditions:

    Make the first one:

    System:variable >= 50

    then 'Add another condition':

    System:variable <=100

    That would work for two plots on the number line, but what If I need to use three or four?

    I might end up using only two but I really wanted a little more depth. Is there any other "simple" way?

  • So you're saying have different events for like, 50, 60, 70, 80, 90, for instance? You could maybe use a for loop... I dunno if it's worth it if you don't have a lot of points though

  • System:Compare two values

    First value: Variable >= 50 & Variable <= 60 | Variable >= 70 & Variable <= 80

    Comparison: Equal to

    Second value: 1

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