Hi, I'm trying to create a fullscreen map and I want to hide the rooms buttons until they visit them. The visited room state is stored in a var called MyScene[n], n being the number of the room. The buttons all have the names "R1", "R2", etc.
This is what I got so far. For some reason the buttons on the map aren't hiding.
this.Close();
// load and display the map
var WinMainMenu = Game.LoadWindow("interface\map\map.window");
var WinControl;
//turns on or off the visited rooms on the map
for(var i=0; i<MyScene.Length; i=i+1)
{
WinControl=WinMainMenu.GetControl(Game.ExpandString("R"+i));
if (MyScene[i]==false)
{
WinControl.Visible=false;
}else{
WinControl.Visible=true;
}
}
WinMainMenu.GoSystemExclusive();
Game.UnloadObject(WinMainMenu);