-
Z hiarchy
I have a question regarding Z hiarchy.
I have been setting up my z hiarchy by having an event such as this.
Always -
bring object a to front
bring object b to front
bring object c to front
ect.
This made it so that C would be on the top, then b, then a.
But, for some reason this stopped working with a specific object about ten objects in.
I've traced my other events and can't find the culprit.
Is this method of setting up Z hiarchy not the best?
-
Re: Z hiarchy
It depends on what you're doing. Could you either describe what you want it to look like or upload your MMF2 file? If you're trying to layer objects according to their X or Y axis, the Layer Object is perfect for this.
EDIT: I take that back. The Layer Object is best for WHATEVER you're doing. ;)
-
Re: Z hiarchy
What I'm trying to do is very simple. I want to layer certain objects within the frame. Specifically player over every backdrop and normal object, above that is the HUD, the pause text, and various effects.
These all exist on the same layer. But I'm trying to layer them withint the layer.
-
Re: Z hiarchy
Why can't you put them in different layers? I can't imagine why a backdrop would ever to be in front of the player.
-
Re: Z hiarchy
I could put it in a different layer. But I already set up such a nice system that allows me to throw stuff around without thinking about it, then layer it later. :D
I was just wondering why my Z hiarchy suddenly failed.
-
Re: Z hiarchy
It could be a bug, but either way I would recommend that you
1. Put background objects that you can't interact with and will always be in the background in a separate layer. Then you can lock the layer to get those objects out of the way.
2. Put the HUD and pause screen on different layers above the "main game" layer. Make the pause screen layer invisible to get it out of the way.
3. Use the Layer Object to fine-tune the layering in the "main game" layer. A lot of the layering can be done automatically with the Layer Object. Try it.
Whatever problem you are having, you can do with the Layer Object and have no problems at all.