|Topic was automatically imported from the old Question2Answer platform.
Currently I have a problem with losing the player position whenever I open and then close a menu (for example the inventory).
The reason for this is that to open up a menu, I use
To resolve this I have two options:
- change the player position value in my
Userdata.gd (primarily used for saving files) upon each use of any menu.
- or instance the Menu scenes via coding, by using
add_child(), and then
queue_free() to close the menu and keep the player in the same position.
Any advice would be appreciated.
why not simply overlay the screen with your menu? Then you just have to toggle visibility of the menu.
Maybe you have to toggle the mouse->filter property too.
Hm… You’re actually right. I guess I’m overcomplicating things again, as always.
I guess I’ll just instance the inventory node within the player node, without using any specific code for it.
One more thing though… I created a menu upon pausing the game. Right now I manually put it in every scene where pausing is possible. It is basically a small overlaying menu, that also makes the current scene darker while active.
If I am to keep it as an overlay, where do you recommend placing it? In the Player scene just like the inventory?
haha-lolcat1 | 2021-08-13 00:14