[help] Object Orders..

For questions about using Classic.

Post » Tue Jun 14, 2011 6:15 am

Hey ;)

So I'm (trying) doing a system where u have many objects from the same sprite every 15 X it spawn another one.. so at the end it's looks like this:


now there is the problem.. I'm trying to make when you have the mouse over a object, it comes to front from the other ones and when not over the object, back to his previous order but I have no idea how to make it back to the exact previous order.. Tryed also make the object go to another layer when the mouse is over him and when not, go back to the previous layer, but when it comes back, they changes his order in relation to others.

Any advice or tips?
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Tue Jun 14, 2011 6:41 am

Did you try storing the objects original layer as a variable, and setting the layer of the object to that variable when you stop mousing over it?
B
3
G
3
Posts: 18
Reputation: 911

Post » Tue Jun 14, 2011 6:46 am

I'd suggest a for each object ordered by private variable ascending... send to front.
If you give each new instance an increasingly higher number(via global pv switch) it will sort to the newest card on top. Descending to do the opposite.
Then for the specific card do compare variable like pv = what you want, send to front
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Tue Jun 14, 2011 11:27 pm

[quote="newt":3jc8sjf5]I'd suggest a for each object ordered by private variable ascending... send to front.
If you give each new instance an increasingly higher number(via global pv switch) it will sort to the newest card on top. Descending to do the opposite.
Then for the specific card do compare variable like pv = what you want, send to front[/quote:3jc8sjf5]
Ya I think that would work, ill try it, thanks ;)
B
30
S
6
G
5
Posts: 433
Reputation: 6,061


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests