Page 1 of 1

Multi-layered world sprites

Posted: Wed Aug 16, 2023 7:31 am
by N00b
Would it be possible to implement attaching multiple world sprites to a single actor, similarly to PSprites? Or, maybe there is already a ZScript way to control the sprite drawing order for actors with equal 2D coordinates (I don't mean the Boom compatibility option)? The use case is equipping monsters with armor pieces.

Re: Multi-layered world sprites

Posted: Mon Aug 21, 2023 11:56 pm
by Erwyn
Hello,

To my knowledge, GZDoom does not natively support the attachment of multiple global sprites to a single actor as with PSprites. However, there are ways to control the drawing order of sprites for actors with equal 2D coordinates, by playing with render labels and using specific sprite layers. For armor attachment, it may be necessary to work with custom scripts to simulate this effect.

Re: Multi-layered world sprites

Posted: Sat Aug 26, 2023 3:47 am
by N00b
Thanks! Could you please clarify what you mean by render labels and sprite layers?
My problem was that I accidentaly enabled the software rendering mode when testing attached actors (and got them clipping through each other in a sort of Z-fight), in hardware the sprites sorted fine. For my purposes attached actors should be enough.