Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Etcher Squared Games on Fri 20/08/2004 03:58:31

Title: Unwanted mouse cursor change after dialog.
Post by: Etcher Squared Games on Fri 20/08/2004 03:58:31
So, after all chats with all my characters, the cursor automatically changes to the pointer cursor.

1. I don't want that.
2. That cursor is normally disabled in my game.


How do I get it to go back to the chat cursor.

thx in advance
Title: Re: Unwanted mouse cursor change after dialog.
Post by: Goot on Fri 20/08/2004 07:07:56
Do you mean you want want the pointer during the dialog or after. I've always had it automatically change back to the talk cursor when a dialog finishes. Maybe it's got something to do with how you started the dialog.
You can always put in repeatedly execute:
if(GetCursorMode()==6){
SetCursorMode(3);
}
Title: Re: Unwanted mouse cursor change after dialog.
Post by: Ishmael on Fri 20/08/2004 11:32:32
You sure the dialog is finished? The only case in which I think the pointer cursor would apper is inside the dialog options list, and if you have change the graphic for the pointer cursor, and you get the default cursor, it seems there's something fishy going on... are you sure there's no unnecesary SetMouseCursor functions laying around, and checked if the pointer is defined as the graphic for some other mode?
Title: Re: Unwanted mouse cursor change after dialog.
Post by: Etcher Squared Games on Sat 21/08/2004 01:01:10
Ok, when on the intro scene, someone clicks on new game it calls a function called Cursors_gamenormal();

here's the definition


function Cursors_gamenormal()
{
  EnableCursorMode(0);   // walk
  EnableCursorMode(1);  // look
  EnableCursorMode(2);  // interact
  EnableCursorMode(3);  // talk
  EnableCursorMode(4);  // inventory
  DisableCursorMode(6);  // pointer
  DisableCursorMode(7);  // wait cursor
}


one particular character has this script as what to do when talked to:
RunDialog(6);


dialog six looks like this

@S  // dialog startup entry point
LOANGUY: "Hi, Mrs. Williams, if you have your game ideas, please show me them."
stop


looking at other forum topics and the ags online help, it looks like I'm doing it right...


Title: Re: Unwanted mouse cursor change after dialog.
Post by: Etcher Squared Games on Sat 21/08/2004 01:17:12
ok I think I got my own problem figured out...
dialog 6 LOOKED like this

@S  // dialog startup entry point
LOANGUY: "Hi, Mrs. Williams, if you have your game ideas, please show me them."
stop

but I decided to try 1 option, show = checked, say = unchecked, and that's it...

so now the dialog script looks like this.

// dialog script file
@S  // dialog startup entry point
return  // i used to have all dialog here
@1  // option 1
LOANGUY: "Hi, Mrs. Williams, if you have your game ideas, please show me them."
stop

can anyone explain why this is?


Title: Re: Unwanted mouse cursor change after dialog.
Post by: Scorpiorus on Wed 01/09/2004 18:53:20
I think there is a bug where AGS doesn't restore a cursor appearence if a dialog was stopped before options are displayed.
Title: Re: Unwanted mouse cursor change after dialog.
Post by: strazer on Thu 02/09/2004 03:33:37
I've noticed it too. It used to work in earlier versions IIRC.
Another workaround is adding a second "Run script" action and putting
SetDefaultCursor();
in there.
Title: Re: Unwanted mouse cursor change after dialog.
Post by: Pumaman on Thu 02/09/2004 21:32:06
Hmm that's strange, you're right .. I'll get it fixed.
Title: Re: Unwanted mouse cursor change after dialog.
Post by: MrCheminee on Tue 09/02/2010 12:00:52
Still, after a dialog the cursor stays a pointer, but with a 'speak to' mode. Only after I've used it on something, it goes back to the 'speak to' graphic as well.

I solved it bij putting 'mouse.UseDefaultGraphic();' in the repeatedly_execute in the global script...
Title: Re: Unwanted mouse cursor change after dialog.
Post by: Pumaman on Sun 21/02/2010 17:13:29
what version of AGS are you using? The original bug reported in this thread applied to a very old version of AGS and has long since been fixed.
Title: Re: Unwanted mouse cursor change after dialog.
Post by: MrCheminee on Sun 11/04/2010 13:20:17
I use Adventure Game Studio 3.1.2... I found it strange as well. :)
Title: Re: Unwanted mouse cursor change after dialog.
Post by: hedgefield on Sun 11/04/2010 15:37:32
I have a similar problem with my inventory GUI. When I open it, I change the cursor mode from WALK to INTERACT, and apply the POINTER cursor image. However, when I right-click to examine an item, once the interaction is done, the cursor switches back to the default cursor image for the INTERACT cursor.
Title: Re: Unwanted mouse cursor change after dialog.
Post by: Pumaman on Sun 11/04/2010 19:37:53
So when specifically does the problem happen? Is it after running a blcoking command like a Wait() that the cursor doesn't return to its old image?
Title: Re: Unwanted mouse cursor change after dialog.
Post by: MrCheminee on Mon 12/04/2010 03:11:04
No, after using a self made GUI...
Title: Re: Unwanted mouse cursor change after dialog.
Post by: hedgefield on Mon 12/04/2010 18:37:42
Yes, I should have mentioned my inventory GUI is entirely custom.

My pointer cursor is, well, a pointer.
My interact cursors is a crosshair.

I open my GUI and say
mouse.Mode = eModeInteract;
mouse.UseModeGraphic(eModePointer);

Ok, good, cursor looks like a pointer. Now, after right-clicking an inventory item and having it's associated LOOK AT msg run, the cursor turns into a crosshair. D:
Title: Re: Unwanted mouse cursor change after dialog.
Post by: Pumaman on Mon 12/04/2010 20:53:42
What does the right-click on the inventory item do? Does it do a Display or a Character.Say()?
Title: Re: Unwanted mouse cursor change after dialog.
Post by: hedgefield on Mon 12/04/2010 21:17:08
It runs this custom function:

DisplayNarration("blablabla.");

Which calls this piece of code from the Global Script:

function DisplayNarration(String text) {
 cEgo.SpeechView = -1;
 cEgo.SayAt(10, 460, 600, text);
 cEgo.SpeechView = 2;
}


So basically a glorified character.say(), yes.
Title: Re: Unwanted mouse cursor change after dialog.
Post by: Pumaman on Tue 20/04/2010 22:47:40
Thanks, I will look into this.