My new code works fine.
Thanks to everybody.
Thanks to everybody.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menufunction repeatedly_execute_always() {
// Put anything you want to happen every game cycle, even
// when the game is blocked inside a command like a
// blocking Walk().
// You cannot run blocking commands from this function.
if (gQuitter.Visible) mouse.Mode = eModePointer;
}
if (keycode == eKeyCtrlQ){
mouse.UseModeGraphic(eModePointer);
mouse.Mode = eModePointer;
gQuitter.Visible = true; // Ctrl-Q
}
function repeatedly_execute_always() {
// Put anything you want to happen every game cycle, even
// when the game is blocked inside a command like a
// blocking Walk().
// You cannot run blocking commands from this function.
if (IsGUIOn(9)){
mouse.UseModeGraphic(eModePointer);
}
}
if (keycode == eKeyCtrlQ){
mouse.UseModeGraphic(eModePointer);
gQuitter.Visible = true; // Ctrl-Q
}
Quote from: Ryan Timothy on Wed 12/06/2013 15:34:38
That's really funny, I swear I suggested that already...Quote from: Ryan Timothy on Tue 11/06/2013 17:50:49Code: ags function repeatedly_execute_always() { if (IsInterfaceEnabled()) Hover.Visible = true; else Hover.Visible = false; }
Always inform us what you're attempting to do because there's generally always a better way than what a beginner scripter thinks they need to do.
function repeatedly_execute_always() {
// Put anything you want to happen every game cycle, even
// when the game is blocked inside a command like a
// blocking Walk().
// You cannot run blocking commands from this function.
if (IsInterfaceEnabled()) Testing.Visible = true;
else Testing.Visible = false;
}
function btnIconExit_Click(GUIControl *control, MouseButton button) {
gIconbar.Visible = false;
gQuitter.Visible = true;
}
function btnIconExit_Click(GUIControl *control, MouseButton button) {
gIconbar.Visible = false;
Testing.Visible = false;
gQuitter.Visible = true;
}
Quote from: Ryan Timothy on Wed 12/06/2013 00:34:38
Everything is fine, yes, but if you would like the best solution to your problem then you should tell us what you're doing.
But from reading your code, you're pressing the exit button and have a Quit GUI pop up. Therefore you're using the wrong solution.
You want to set the GUI as pause game when shown. That should be the only solution you need. You wouldn't need to disable hotspots, objects, or characters.
Quote from: Crimson Wizard on Tue 11/06/2013 20:56:03
Oh my.
It should start with 1.Hotspot 0 is "no hotspot".
Code: ags int i = 1; while (i < 50) // since there are 50 hotspots max { hotspot[i].Enabled = false; i++; }
PS. No "if (hotspot[ i ])" check is not needed, because there's always 50 (49) hotspots in 3.2.1 (even though most could be unused).
function btnIconExit_Click(GUIControl *control, MouseButton button) {
gIconbar.Visible = false;
int i = 0;
while (i < 50) // since there are 50 hotspots max
{
if (hotspot[i]) // <--- Doublehotspot: invalid hotspot specified
hotspot[i].Enabled = false;
i++;
}
gQuitter.Visible = true;
}
function btnIconExit_Click(GUIControl *control, MouseButton button) {
gIconbar.Visible = false;
int i = 0;
while (i < 50) // since there are 50 hotspots max
{
hotspot[i].Enabled = false;
i++;
}
gQuitter.Visible = true;
}
QuoteAnd frankly, to me it's a mystery why people don't use this feature properly
function game_start() {
// Put the code all in a function and then just call the function.
// It saves cluttering up places like game_start.
initialize_control_panel();
invCustomInv.ItemHeight = 30;
// Use the KeyboardMovement module to, per default, replicate the standard
// keyboard movement of most Sierra games. See KeyboardMovement.txt for more info
KeyboardMovement.SetMode(eKeyboardMovement_Tapping);
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.092 seconds with 14 queries.