I've create a room that actually a GUI room on my game start menu.
The menu including the 'setting' sub menu that represent,
the audio & game speed option (gSetting),
and for that 'setting' menu i set a custom gui that include
audio & game speed slider.
Unfortunately when i start the game on the very first room,
when i hit the tab that showing the default gPanel gui,
the audio & game speed slider on gPanel
not match the alternate audio & game speed custom gui
that i make at the game start menu.
In other word, the setting i make at the game start menu,
not save automatically,
because the audio & game speed slider
reset to max value (100) itself on gPanel (although i setup the slider
setup value on 50 at gui properties option)
at the first room when the game start.
below is the script that i use for custom
audio & game speed option menu
Code: ags
note: SliderAV are the Audio slider option,
SliderGS for Game Speed slider option,
ButtonCS is a confirm setting button (OK button)
then below is the default Audio & Game Speed option on gPanel
(default setting on AGS Editor)
Code: ags
That i miss something or i do a strange scripting?
besides i don't want to set a value on audio & game speed,
what i want is, the player can setup freely on audio & game speed
without a certain value at the game menu option & then the current setting
continues when the game start on first room,
without need to change/setting back the option.
p/s: sorry for my bad English.
THX.
The menu including the 'setting' sub menu that represent,
the audio & game speed option (gSetting),
and for that 'setting' menu i set a custom gui that include
audio & game speed slider.
Unfortunately when i start the game on the very first room,
when i hit the tab that showing the default gPanel gui,
the audio & game speed slider on gPanel
not match the alternate audio & game speed custom gui
that i make at the game start menu.
In other word, the setting i make at the game start menu,
not save automatically,
because the audio & game speed slider
reset to max value (100) itself on gPanel (although i setup the slider
setup value on 50 at gui properties option)
at the first room when the game start.
below is the script that i use for custom
audio & game speed option menu
function SliderAV_OnChange(GUIControl *control)
{
System.Volume = SliderAV.Value;
}
function SliderGS_OnChange(GUIControl *control)
{
SetGameSpeed(sldSpeed.Value);
}
function ButtonCS_OnClick(GUIControl *control, MouseButton button)
{
gSetting.Visible = false;
ButtonNGM.Enabled = true; // other menu on gui start menu
ButtonLGM.Enabled = true; // other menu on gui start menu
ButtonEXT.Enabled = true; // other menu on gui start menu
}
note: SliderAV are the Audio slider option,
SliderGS for Game Speed slider option,
ButtonCS is a confirm setting button (OK button)
then below is the default Audio & Game Speed option on gPanel
(default setting on AGS Editor)
function sldAudio_OnChange(GUIControl *control)
{
System.Volume = sldAudio.Value;
}
function sldSpeed_OnChange(GUIControl *control)
{
SetGameSpeed(sldSpeed.Value);
}
That i miss something or i do a strange scripting?
besides i don't want to set a value on audio & game speed,
what i want is, the player can setup freely on audio & game speed
without a certain value at the game menu option & then the current setting
continues when the game start on first room,
without need to change/setting back the option.
p/s: sorry for my bad English.
THX.