Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Torchiest

#1
I've got the following script that runs when trying to interact with a door:

Code: ags
function hDoor_Interact()
{
  if (KeyInDoor)
  {
    cEgo.Walk(960, 620, eBlock);
    dGetKey.Start();
    KeyInDoor = false;
    GiveScore(5);
    Display("You grab the keys, happy to have them.");
  }
  else
  {
    Display("You don't need anything from there right now.");
  }
}

And then the dialog is simply this:

Code: ags
// Dialog script file
@S  // Dialog startup entry point
EGO: My keys were in the door!
stop

The Display function always runs before the dialog. I've tried calling Wait() with some number in it between the Start() and Display() calls, but it just delays both the text popup and the dialog, still showing the window first. I'd assume this is a common coding situation, but I've having a really hard time getting useful search results. Hopefully I'm just unaware of some simple way to make this work. Can anyone help?
SMF spam blocked by CleanTalk