I've got the following script that runs when trying to interact with a door:
Code: ags
And then the dialog is simply this:
Code: ags
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?
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:
// 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?