Jump to content

Are dialogs synchronous?


jeffnerner

Recommended Posts

Upon entering a zone, I'd like to display a series of messages to the user after which I'd like to activate the next zone (plus make it visible) and then display the Locations screen to the user.

 

I thought the obvious choice was to use a Dialog action followed by the zone active/visible and then a "show screen 'locations' ". But when played in the emulator the "show screen" ends up overwriting the dialog. Short of doing a handful of "show message" actions, each with a button script, is there any way to ensure synchronous execution of script actions in this case?

Link to comment

You have to select the option to show a series of messages to a player. It'll give you a box with a table. You can add as many dialogs there as you like.

 

Yep...I thought I did that. I have 4 rows in that table, representing 4 different messages I'd like presented to the user in sequence. The pseudo code for my script is something like this:

 

show a series of Dialog messages to the player

  • message 1
  • message 2
  • message 3
  • message 4

set zone 2 active

set zone 2 visible

show screen Locations

 

What I end up seeing (at least in the emulator) is a momentary flash of message 1 followed by the Locations screen.

Link to comment

The alternative is to use "Show message to player"

In the dialog box then select "Script to run when button clicked"

and just keep repeating this placing the new "Show message to player" in the "Script to run when button clicked"

The final "Script to run when button clicked contains the

set zone 2 active

set zone 2 visible

show screen Locations

 

It does mean you have a lot of windows open by the time you get to the 4th message but it seems to work for me.

 

It also allows you to customise things a bit more, like chooseing what the buttons say or possibly choose sound playing during message3.

 

Memory wise its probably not very efficient.

Edited by a_snail
Link to comment

The alternative is to use "Show message to player"

In the dialog box then select "Script to run when button clicked"

 

Yeah...I was about the head down the nested MessageBoxes path, but thought I'd ask here before coding things that way.

 

Sure would be nice if the Wherigo.Dialog method supported a callback, similar to what's available with Wherigo.MessageBox so that follow-on actions could be held until completion of the sequence of messages. Even better if execution of script actions didn't continue until the final button on the Wherigo.Dialog was pressed. :rolleyes:

Link to comment

Even better if execution of script actions didn't continue until the final button on the Wherigo.Dialog was pressed. :rolleyes:

It can be useful to let things run in the background while the user is reading messages. Its just a matter of getting used to the way it works. In the long run it makes it more flexable. Playing sound in the background or sorting out the task list for instance so that its all ready by the time the user has finished reading the messages rather than having some awkward pauses afterwards.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...