Basically, there are rows, I want anything on the bottom layer to look like it’s in front of anything on a higher layer, So it doesn’t look like they’re being stepped on, but rather stepped behind.
I could do this by just changing the order based on Y axis, but then I’m not really sure how I’d do that.
And I’m not sure if I want everything to change layer.
If anyone has an example of this I’d love to look
just extract y and divide by whatever grid value you’re using (probably 32 or 1 flowlab grid)
and set that to ui layer
Alright so it works for the most part, but now their helmets are behind them, and no matter what the order of the helmets is, they always end up behind them
I’ve tried reloading the page but it’s always the same
The order message sends to all the detached body parts and helmet.
that’s why, just put the code in the helmets to calculate a different display order
I know it’s been a while, but this has made more issues, Since the different body parts are attached objects. Sometimes their order doesn’t work right, and something will be under something that should be above. I right now I use a timer to reapply the order again, but it only works sometimes. Is there a way to make all the attached objects act as if their all one object? Instead of different layers?
You can have the main object send a message to all Attached objects with its display value.
Then use that to set the display order
But then, the attached objects sometimes go behind the base object. It’s very hit or miss.
You can add an offset. So the attached object can be Base Display Order + 1
See I thought about this too, but then it makes other enemies look weird when they overlap, because certain parts of them are on top
So you’re saying that an enemy may be behind another one, but some of the attachments are above, correct?
If that’s the case, you can try spawning them in, and after each spawn give them a progressively lower display order (900>890>880, etc. Something like that). I don’t know entirely what you’re trying to do, so I’m just guessing this might work, but it might not be what you’re looking for
It’s like, imagine theres an object, and object has armor attached to it as a separate object. I need the armor to be visible on top, but not have a higher display order, so that if the exact same object comes by it goes above the original and it’s armor.
I could have the order descend, but there’s infinite potential enemies, so I feel like that would just cause a problem.
This is such a strange issue, I’m thinking of adding another to the order for every enemy that spawns, but yet again, that’s capped eventually.
So if both the enemy and armor have a display order of 10, which one would be shown?
I would assume Flowlab has a way to determine this, like the order in which the objects were spawned or something like that. But I’m assuming you already did that, so idk.
I’m still stuck on mobile so I can’t test this