How do I compare multiple variables to be the same?

0 favourites
  • 2 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hello guys!

    I have 4 variables that counts the number of color blocks in my game.

    colorCount1

    colorCount2

    colorCount3

    colorCount4

    Now I want to check if the variables are the exact same number.

    The problem is that sometimes in my game only 2 colors are used in certain levels and that means only colorCount1 and colorCount3 are used for example. So in this level only these two values must be identical.

    In other levels there are sometimes 3 colors so I have to check if these 3 colors have the same number.

    I hope you guys can understand as I had to use DeepL to translate it.

    Best,

    Kraudi

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think I have encountered something like this. First you need to enlist what color (probably animation frame) are exist in current active stage. Put the list array for easier indexing access to their value. Then you can compare each color count through a loop checking.

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