[SOLVED][1.14.0] - Making Progress With 1st Game...How To Make GUI Go Below Scene Fading Sprite? (SOLVED)

Hi,

New to Defold Engine…
How do we make a GUI go below our scene fading sprite?

Please look at Web HTML5 version on itch site below to see issue on third scene.
(game project is MIT open-source and the full project can be downloaded below on itch site)
Any help would be appreciated, thank you.

Savant Savior

1 Like

Best is to… make a fade in/out “curtain” as a GUI node :wink: So same as you did, but with a GUI node, and if you want to control it from script - send a message to gui_script to do so.

I guess I can try that…
Does Z-Index work with GUI nodes?
Like have scene fade sprite GUI node have z=1.0
and then GUI node with GUI button have z=0.5 ?

Above is not working…
See image below:

I see GUI “Layer”, but the problem is the scene fading sprite & GUI button are in 2 different collections.

I got it working:

I had to attached GUI scripts to both the GUI scene fade and GUI button.
And then set in “init” function of both GUI scripts:

gui.set_render_order(number between 0 and 15) -- Higher number would render above lower number

Still have some things to figure out with this, I post to itch when done, thanks!

Ok, everything is working, visit itch page below for Web HTML5 / Linux demo and project source:

2 Likes

Perfect!