Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: paolo on Sat 06/01/2007 12:14:58

Title: Display message after action has happened (SOLVED)
Post by: paolo on Sat 06/01/2007 12:14:58
Here's a simple scenario that has probably been answered before, but I get too many hits when I search for it.

When I interact with an object, I want the object to be replaced by another and then for my character to make a comment.

The interaction I am using is:

- Remove first object from room
- Switch second object on
- Display a message

However, what happens when I test the game is that the message appears first and the change of object doesn't happen until after I click to hide the message. How can I make the change of object happen first?

Thanks.
Title: Re: Display message after action has happened
Post by: Ashen on Sat 06/01/2007 13:03:56
I think the problem that turning Objects on/off isn't blocking, while displaying a message is (the message 'pauses' the engine before the Objects have had a chance to change state, and they then can't change until it's gone - sounds like your problem).
You should be able to sort this by pausing briefly before the message (in scripting this would be the Wait command, in the Interaction Editor it's the 'Game - Pause command processor for a set time' interaction; 1 loop should be enough).
Title: Re: Display message after action has happened
Post by: paolo on Sat 06/01/2007 13:27:06
Yep, that does the trick. Thanks!