Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: bx83 on Thu 15/04/2021 03:26:54

Title: Can you set a DynamicSprites ZOrder to be above a GUI's?
Post by: bx83 on Thu 15/04/2021 03:26:54
ZOrder doesn't exist for DynamicSprites, but here me out...
I'm using the SpeechBubble module, and want to alter it so that a speech bubble appears above the Inventory GUI (ZOrder=2) when it appears. This way, speechbubbles are not covered up by the GUI, which has a solid background.
However, I don't know how I can do this?
Title: Re: Can you set a DynamicSprites ZOrder to be above a GUI's?
Post by: Gilbert on Thu 15/04/2021 06:16:16
ZOrder doesn't exist for DynamicSprites, but that's because you need to assign the sprite to an entity such as an object, a character, an overlay or even an element of a GUI, where the sprite's order follows that entity.

So, you may try to make a GUI of high order with a single sprite on it, which could be changed in game to whatever dynamic sprite you're like to display and cover up the other GUIs.
Title: Re: Can you set a DynamicSprites ZOrder to be above a GUI's?
Post by: Khris on Thu 15/04/2021 09:12:03
To put SpeechBubbles above other GUIs, the module has to be set up to use a GUI instead of an overlay. It already supports this.
Then all you need to do is give that GUI a higher z-order than the inventory's.