PDA

View Full Version : * Statefullness ?



~Nasko
08-23-2004, 07:18 AM
Dear all,

I am trying to achieve the following result:

I have an imagewith Initial Object State Visible = 1 (true) and Initial Object State Enabled = 1 (true).
Button A makes this image disabled and invisible.
Button B makes this image enabled and visible.

Then i move to another scene.
When i return back to the previous scene, i would like to see my image with its last state i.e. visible/enabled (if button B has been pressed) OR invisible/disabled (if button A has been pressed).

How can i keep the state of an object between the scenes ?
Thank you in advance !

~Nasko

EthanBedwyr
08-23-2004, 08:52 AM
On the button presses to make the image visible/invisible, add a "perform calculation" action to set a global variable. For example, you might set Global String Variable 1 to "on" or "off" depending on which button the user clicks.

Then set an event at 0.0 seconds in the scene containing the image. Have it test the global variable and enable or disable the image accordingly.

Hope this helps. :)