Hi, I’m actually learning defold game engine. I started with the Climberz example, trying to add a menu in it. So when the game character dies it triggers a scoreboard by sending it a message. The menu shows but when i want to get input to hide it, that doesn’t work.
hello m8 welcome to defold you want to hide the gui node example the text or you want delete? if you want hide a node you can do this
gui.set_enabled(gui.get_node("nameofnode"), false)
to hide
gui.set_enabled(gui.get_node("nameofnode"), true)
to enable a node
thanks I hope this helps
thank you very much
thanks and be well, does this helped your issue if yes to put as solved
Yes it helped
ok nice to hear. be well m8 thanks and again welcome to defold I am a learner too, forum is the best place for you to ask and search things, also learn where is the manuals, and @britzl examples
You could add the menu GUI in the same screen as the main game or you could make it a separate screen and load and unload it. This is shown as an example here: https://defold.com/examples/collection/proxy/
Thank you, i’ll go with the collection proxy if i save a variable “best score” in the main collection and reload with collection proxy, does the variable “best score” reinitialize?
Yes it will be. You can either store the best-score in a shared Lua module, but that will not persist between application starts. You need to save the score to file. It’s actually pretty easy: