Forum rules - please read before posting.

Menu elements reset on scene change

edited April 2014 in Technical Q&A
I have a system in my game where there are multiple player classes, and some of the menus have different icons depending on what class was chosen at the beginning of the game (fighter has a sword button to equip, wizard has a staff button).

I tried setting up the menus so that the sword and staff are both not visible initially, and then when the player chooses his class, an action is run which shows the appropriate menu elements. This works fine for the scene in which this action is run, but then when I move onto a new scene in that playthrough, the element has returned to being invisible.

Is this a bug, or is it supposed to function this way? Does anyone have any thoughts on how to get around it, besides having each scene check the player's class and then show the correct element (there are a lot of these elements)? Thanks!

Comments

  • edited April 2014
    Hey Skitt2501

    It sounds like you are not checking them in the cutscene of the scene you entered?  If you are using Variables to decide which class is being chosen, you should check them in a cutscene , in the scene you entered.

    Edit: Ups you already mentioned "besides" this point. Well im also eager to know if there is another way to solve this.


  • Actually, I'm doing it in two ways: 

    I have menu buttons for choosing the character class, and clicking one of these button runs an action list where one of the actions shows the appropriate menu elements. I noticed this wasn't working for all the scenes, so I then tried it your way, where on start in a scene I would check the class, and then run the appropriate show menu element action from there. Still only works for the scene its in.

    Actually right now, I'm using both of these methods, I suppose to be safe.
  • This is likely a bug.  The visibility states of elements are recorded in saved games, but it's likely they're not retained on a scene change.  Will investigate.
  • Thanks again!
  • Hi,

    I've got a problem that seems to be similar to this one.

    When i pick up an object and put it in my inventory, i turn off the visibilty of this object and the hotspot.

    But when i change scene and come back, the object and the hotspot are back to default state (on).
  • Fixed for 1.32.
  • edited May 2014
    I still have this problem in 1.32. When I have a menu locked at the start of the game and then unlock it in one scene, when I move to the next scene it is locked again. And any buttons that I have made visible on this menu also are invisible again after a scene change.

    Is this a change made to MenuSystem.cs? I don't update that script because it has a lot of my custom code.
  • Sorry!  Simple error, fixed for 1.33.
  • I still have this problem with 1.33b. Hotspots seem to be remembered but lights do not.
  • What do you mean by lights?  This thread was about menu elements.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.