"Wait" Mouse Cursor Graphic

Started by Ghostlady, Thu 07/07/2011 01:50:47

Previous topic - Next topic

Ghostlady

I am currently using a hourglass for my "wait" mouse cursor.  I would like to change that to a pointer when a speech gui is displayed.  How can I do this?  I tried this in my room repeat exec and it does not change.

    if(Mouse.Mode == eModeWait) {
      if (gGui3.Visible == true) {
          mouse.UseModeGraphic(eModeInteract); }}
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

Gilbert

I'm not sure if this is the problem. Have you tried putting that in repeatedly_execute_always() instead?
I think when the game is in pause/wait mode repeatedly execute will stop running.

monkey0506

#2
Gilbot's right here. It's explained in the manual..somewhere about blocking vs. non-blocking functions.

repeatedly_execute (and room_RepExec) are never called during blocking functions.

repeatedly_execute_always is called even during blocking functions (including dialogs depending on the option in the General Settings pane).

Edit: It's in the manual under Scripting > Understanding blocking scripts.

Ghostlady

Ah.

Where is "repeatedly_execute_always"?
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

Khris

Just create it in the global script:

Code: ags
function repeatedly_execute_always() {


}

Ghostlady

I created it in the global script and it still is not changing the graphic.
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

Gilbert

Depending on what template you started making your game from. If you're using the default game template the function should already appear in the global script, so add the codes there instead of creating a new one (it would be odd that the compiler did not complain about this though) if this is the case.

However, as you mentioned you put this in the room script originally, where do you want this to happen? If you want the behaviour for the whole game then yeah just put the codes in the function in the global script, but if you really only want it for a certain room, create that function in the room's script instead.

Ghostlady

It is not working in either place.  Room script or global.
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

Gilbert

#8
I'm not sure about the reason. Maybe during pause mode the engine will force display the Wait cursor.
You may try changing the graphics of the cursor in pause mode altogether and see if that works:
Code: ags

 if(Mouse.Mode == eModeWait) {
      if (gGui3.Visible == true) mouse.ChangeModeGraphic(eModeWait, mouse.GetModeGraphic(eModeInteract)); 
      else mouse.ChangeModeGraphic(eModeWait, slot1);
  }

Where slot1 is the original graphic slot for the wait mode.

Ghostlady

Sorry, but this doesn't work either. :(
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

SMF spam blocked by CleanTalk