I’m trying to make a button which is located in a scene stay pressed while I change the scene
What is the expected result
I am supposed to press a button that is in scene “1” (to give a reference), and the button should remain pressed no matter what scene I switch to, unless I decide to deactivate the button by going back to scene “1”
What is the actual result
What happens is that when I start the preview, I press the scene 1 button, I change the scene, and when I go back to the button scene, the button is disabled again (I tried to occupy a global variable, but it doesn’t work either).
Hey there, just in case you haven’t found a solution to this yet I wanted to pop in.
I am going to prelude my suggestion stressing that I have achieved the rank of Brand Spanking Newb when it comes to all of this.
Currently I am making a top down shooter for kids and I have a character select and it needs to be read with each revive and new scene we go to. I have one global variable for each of my characters. When selected their value is set to true while other characters variables are set to false. After you die, you can select a new character, play the game, and then enter a separate high score for that play as well. So I think that experience is similar to what you want to do. Except instead of doors I use characters.
I think you are on the right track with the global variable but I used change the value instead of toggle. I know toggle should work, but I have it in my project as change the value to true.
Currently I am also working on a 4x strat game for myself. I use a lot of buttons to purchase different types of units or commit to certain actions as well as dialogue choices for story events. I found that putting my buttons on a layer on the scene is what helps the most. I just have something that hides that layer when it’s not needed and my buttons don’t transfer between scenes. If you’re moving scenes you’re going into a mini game. So, another set of controls. However, when I come back, all of my resources and events are still there. So I think I am still doing something similar to what you are looking for. I wonder if you utilized the pause scene function instead of the change scene one would perhaps reveal another way to solve the issue.
Anyways, I hope you keep up the work ya legend. Can’t wait to play your game one day!
Thank you for your answer, I already solved the problem, but even so I thank you for the help, I hope you do well developing your game
Glad to hear you figured it out! Can’t wait until we get to see your game!