How do I get construct 2 to recognize order?

Get help using Construct 2

Post » Wed Oct 22, 2014 3:34 pm

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?
B
26
S
8
G
4
Posts: 68
Reputation: 4,424

Post » Wed Oct 22, 2014 4:01 pm

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...
B
6
S
2
Posts: 64
Reputation: 576

Post » Wed Oct 22, 2014 5:12 pm

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.
B
26
S
8
G
4
Posts: 68
Reputation: 4,424

Post » Wed Oct 22, 2014 5:14 pm

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.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Wed Oct 22, 2014 5:23 pm

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.
B
6
S
2
Posts: 64
Reputation: 576

Post » Thu Oct 23, 2014 1:24 am

I was able to figure it out through the use of instance and global variables but thanks for the help!
B
26
S
8
G
4
Posts: 68
Reputation: 4,424


Return to How do I....?

Who is online

Users browsing this forum: dop2000, max2612, Yahoo [Bot] and 5 guests