How do I get construct 2 to recognize order?

0 favourites
  • 6 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • I'm creating a game that asks the player to drag sprites and place them on top of each other in a specific order. If the player is on the right track they will get positive feedback and the opposite if they place the sprites in the incorrect order. Is there any way to do this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, you can try to inspect the z-order of the sprites in question...

    Basically, ZIndex property gives you "the zero-based index of the Z order of the instance within its current layer. 0 is the bottom instance, increasing up to the top instance."

    Do a simple < or > test on your sprites...

  • I don't have the full version of the construct 2 so I can't edit Z order. I can only manipulate what appears on the top and bottom of the layout.

  • The closest you could do is set private variables as a workaround, I guess, but it may not be something within the scope of the free version.

  • If you have a sufficently small number of objects, you can simply move objects around placing them on different layers. Afterwards, you can test the layer the sprite is on with the Sprite.LayerName expression or similar.

  • I was able to figure it out through the use of instance and global variables but thanks for the help!

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