Attributes over several scenes
perfectanswer
PRO Posts: 121
Hello,
I've some (Game)Attributes and in this special case a 'real' value with 0.5 as start value.
There are 2 scenes.
One with game and one with a debug panel. On this panel are several sliders to change some of the game Attributes. If I press pause in the game, I jump to the other scene (debug) and change there my values aka Attributes, but if I'am back in the game there has nothing changed.
Than I attemped to save the attribute and with a timer in the game I loaded - but nothing changed.
Question one: Is it possible to change attributes (Game Attribute) over scenes?
Question two: Is there another way to change this attributes or a advise to bring me on the right way?
Thanks in advance for help?
PerfectAnswer
I've some (Game)Attributes and in this special case a 'real' value with 0.5 as start value.
There are 2 scenes.
One with game and one with a debug panel. On this panel are several sliders to change some of the game Attributes. If I press pause in the game, I jump to the other scene (debug) and change there my values aka Attributes, but if I'am back in the game there has nothing changed.
Than I attemped to save the attribute and with a timer in the game I loaded - but nothing changed.
Question one: Is it possible to change attributes (Game Attribute) over scenes?
Question two: Is there another way to change this attributes or a advise to bring me on the right way?
Thanks in advance for help?
PerfectAnswer
Comments
Q1: Yes, it's possible
I have change a rule there I compare the value from the attribute and the value from the slider. If they not equal I fire a timer every 0.1sec. to save the new value in the Game Attribute.
I deal with this issue several hours, but after posting it here, the solution came in minutes )
Thank you for your time!