Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Kweepa on Tue 02/12/2003 20:21:58

Title: Trying to turn character before dialog
Post by: Kweepa on Tue 02/12/2003 20:21:58
So, I do this:

// treat as pseudocode - I don't have AGS handy
MoveCharacterBlocking(EGO, BAR_PUNKALLEN_DIALOG_X, BAR_SCID_DIALOG_Y);
FaceDirection(DIRECTION_RIGHT);
RunDialog(DIALOG_PUNKALLEN);

to walk somewhere, face a character, and talk to them.

However, the face direction command doesn't seem to be executed until AFTER the first line of dialog has been selected.

I can fix it by putting a Wait(1) between FaceDirection() and RunDialog(), but that seems like a hack. Anyone know what's happening?

Cheers,
Steve
Title: Re:Trying to turn character before dialog
Post by: Pumaman on Tue 02/12/2003 22:39:28
FaceDirection does not update the screen; similarly, drawing the dialog options does not update the screen in the background. It's only when one character starts talking that the screen gets refreshed.

The easiest solution is probably to add Wait(1) to your FaceDirection function.
Title: Re:Trying to turn character before dialog
Post by: Ishmael on Thu 04/12/2003 12:30:04
I think the manual should document that some functions do not update the screen imidiately, and so need a Wait(1); to work as intendet.... just like the note of the blocking functions...
Title: Re:Trying to turn character before dialog
Post by: Gilbert on Fri 05/12/2003 01:16:24
Actually all nonblocking functions won't update the screen "immediately", as the screen would only be updated when a game loop is advanced.

But that, I think it's a good idea to put a line reminding users in such functions as FaceCharacter(), etc.
Title: Re:Trying to turn character before dialog
Post by: Pumaman on Sat 06/12/2003 18:18:34
Yeah, that's probably a good idea, will do.