GUIs activate while dialogue is running

Started by Bernie, Sun 08/02/2004 03:38:05

Previous topic - Next topic

Bernie

In my game, a right-click makes a verb coin appear and dissappear when the player lets go. This worked fine so far, but after triggering a dialogue from within a script after a cutscene, The guis updated while my characters were talking (areas ans hotspot names were shown), I could even call up the verbcoin while they were talking, nothing was blocked. But when I trigger a dialogue after the user clicked on something, it works fine.

Hm...

Bernie

It seems to depend on where the Rundialog function is placed. I had it under a walk onto region event before, after a cutscene when the player walked onto it, and the guis would run while a dialogue was going on (but only after i clicked one of the dialog options).

Now I tried to set a GlobalInt to 1 when the player walks onto the region and trigger the cutscene and rundialog from repeatedly execute, which seems to work fine.

But I still think this shouldn't be like that... why does this happen, any ideas?

Pumaman

Are you using sierra-style or lucasarts-style speech?

The mouse click should be intercepted to skip the current line of speech - is this not happening? I tried a quick test game to replicate the problem but was unable to - could you upload something which demonstrates the problem?

Bernie

#3
EDIT - I'm using lucas arts type speech.

I've uploaded a small open sauce version at neole's place (thanks, neole).

When you walk to the right where the bucket is, the character will hit a region which triggers dialogue 10. While they're talking, you can see the object descriptions when you're over something, and you can even call the verb coin. To see it better, you could try do deactivate skipping text with clicks.

But when you try to talk to the bucket using the verb coin, it works fine, even though it uses exactly the same code. I seems to depend on when you call the dialogue. Maybe it queues it differently when called within a region script?

http://www.2dadventure.com/ags/dialogbug.zip

Thanks!~

Pumaman

Thanks for uploading it.

The reason is that repeatedly_execute is still being run while the conversation is taking place, so all your code in there to do the hotspot names, bring up the verb coin, etc, is still working.

In order fix the problem, add a line like this to the start of repeatedly_execute:

if (IsInterfaceEnabled() == 0) return;

If the conversation is launched from a global script function (eg. the character interaction) then repeatedly_execute doesn't run in the background, which is why you're seeing the inconsistency.

Bernie

This works great! :D Thanks for taking the time to look at it.
I'll just go and continue to work on my game then.

Hooray!~

SMF spam blocked by CleanTalk