Unwanted mouse cursor change after dialog.

Started by Etcher Squared Games, Fri 20/08/2004 03:58:31

Previous topic - Next topic

Etcher Squared Games

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
website: http://www.etcher2games.com/
email: etcher2games@yahoo.com
forum: http://www.etcher2games.com/forums

Anyone want to make my website for free?

Goot

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);
}

Ishmael

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?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Etcher Squared Games

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...


website: http://www.etcher2games.com/
email: etcher2games@yahoo.com
forum: http://www.etcher2games.com/forums

Anyone want to make my website for free?

Etcher Squared Games

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?


website: http://www.etcher2games.com/
email: etcher2games@yahoo.com
forum: http://www.etcher2games.com/forums

Anyone want to make my website for free?

Scorpiorus

#5
I think there is a bug where AGS doesn't restore a cursor appearence if a dialog was stopped before options are displayed.

strazer

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.

Pumaman

Hmm that's strange, you're right .. I'll get it fixed.

MrCheminee

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...

Pumaman

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.

MrCheminee

I use Adventure Game Studio 3.1.2... I found it strange as well. :)

hedgefield

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.

Pumaman

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?

MrCheminee


hedgefield

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:

Pumaman

What does the right-click on the inventory item do? Does it do a Display or a Character.Say()?

hedgefield

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.

Pumaman


SMF spam blocked by CleanTalk