Z-ordering problem

Discussion and feedback on Construct 2

Post » Fri May 02, 2014 5:21 pm

Hi,
@Ashley
Don't suppose It's a bug, so I'm posting it here.

Just discover issue with object asjson and z-ordering. Basically here's the scenario:
I have an object I want to "duplicate" . On clicking on it, its data is being stored asJson in webstorage, then same object is being spawned, and it is being set from Json string. But both are being given same z-ordering! This makes picking "top/bottom" impossible.

[email protected] I've found a fix for that. But it's a really unnecessary hustle. In the future, could setting object from json automatically check if object with same z-ordering exists already, and if it does new z-order would be applied?

z-order.jpg
You do not have the required permissions to view the files attached to this post.
Last edited by megatronx on Fri May 02, 2014 6:58 pm, edited 4 times in total.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Fri May 02, 2014 5:29 pm

This seams right - from json point of view - because you are saving everything about this sprite and then load it up.
But from editor point I would say it's a bug, Two objects can't have same Z value. After creating new object it should automatically assign next available Z value - even if you set Z from other source it should not set already existing Z value.
ImageImageImageImage
B
157
S
66
G
42
Posts: 2,603
Reputation: 35,343

Post » Fri May 02, 2014 5:31 pm

shinkan wrote:This seams right - from json point of view - because you are saving everything about this sprite and then load it up.
But from editor point I would say it's a bug, Two objects can't have same Z value. After creating new object it should automatically assign next available Z value - even if you set Z from other source it should not set already existing Z value.


... As always - edited first post while you were writing XD haha!
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Fri May 02, 2014 5:33 pm

haha I think I need to learn to wait couple of days before replaying to your posts xDD
Gladly my replay still applies... this time anyway:D
ImageImageImageImage
B
157
S
66
G
42
Posts: 2,603
Reputation: 35,343

Post » Fri May 02, 2014 5:34 pm

shinkan wrote:haha I think I need to learn to wait couple of days before replaying to your posts xDD
Gladly my replay still applies... this time anyway:D


Yeah :D lol . but don't wait 2 days XD
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099


Return to Construct 2 General

Who is online

Users browsing this forum: mihirolover, RonMob, Tjums and 18 guests