Trying to turn character before dialog

Started by Kweepa, Tue 02/12/2003 20:21:58

Previous topic - Next topic

Kweepa

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
Still waiting for Purity of the Surf II

Pumaman

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.

Ishmael

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...
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Gilbert

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.

Pumaman

Yeah, that's probably a good idea, will do.

SMF spam blocked by CleanTalk