How to manipulate objects in Z order ? Which is on top?

Get help using Construct 2

Post » Thu May 25, 2017 11:28 pm

Wouldn't this condition work?

System->compare triangle.zorder < square.zorder
Posts: 5,274
Reputation: 69,959

Post » Thu May 25, 2017 11:34 pm

so i was gonna try to get specific but as i dont know excactly what youre doing i dont want to confuse you, but consider attempting making global variables and calling them layers,using numbers to specify , and then have something along the lines of if #>highest layer set to 1 and then add 1 to each layer so as each object would have its own number, or certain actions could send different objects to the same 'layer' etc. if its just for functionality, this should work. used in conjunction with the "send to top of z order" command, it shouldnt be too hard to rig something up. although i did do a test with 3 blocks, where if sprite.zindex =0 play sound 1, sprite 2 = 0 play sound 2, etc, (with condition trigger once while true so as to stop infinite loops), and clicking sent them to the top of z order, and same blocks would play different sounds, even though every time i clicked them they would visibly be on top, and sometimes switching between 2 without going to the 3rd would cancel the desired action. so for what its worth, i see what youre going through lol.hopefully the variables as layers option works for you
Posts: 108
Reputation: 2,774

Post » Tue May 30, 2017 10:53 am

Ok. Finally i found the best and the simpliets way to do what i wanted :D!!

Thanks the_Shit_Hawks for your soultion. I made something like that:


Looks simply as fun.. And it works very well!! :)

Thank you guys! :) :)
Posts: 34
Reputation: 268


Return to How do I....?

Who is online

Users browsing this forum: David181, OBLIVION and 62 guests