Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Licht61 on Wed 03/02/2021 18:26:39

Title: Character walk after dialog and face direction
Post by: Licht61 on Wed 03/02/2021 18:26:39
In the dialogue file, I tried to program two characters to go to a certain point on the screen when the conversation ends.

Approaching this point, they should turn around. I manage to make the characters leave when the dialogue ends, but when they arrive at their second point, they don't turn around.

Here's code from dialogue file:
Code (ags) Select
Pugovkin: Start. Sleep. Meet. Sign.
Pugovkin: I serve the Soviet Union!

  cGorb.Walk (185, 156, eNoBlock, eAnywhere);
  cScient.Walk(190, 153, eNoBlock, eAnywhere);
  cScient.FaceDirection (eDirectionLeft);
  cGorb.FaceDirection (eDirectionLeft);
stop


And here's the Room Script with Region that start's this dialogue:
Code (ags) Select
function region2_WalksOnto()
{
  dDialog1.Start();
  region[2].Enabled=false;
}


I tried place the part with cGorb and cScient.Walk lines in Room's Script, but in this case, Gorbachev starts walking immediately when you enter Region 2, and the Scientist turns in place and does not go anywhere.


Title: Re: Character walk after dialog and face direction
Post by: eri0o on Wed 03/02/2021 18:40:37
That walk is not blocking you need to wait somehow before turning the characters head.
Title: Re: Character walk after dialog and face direction
Post by: Khris on Wed 03/02/2021 19:28:11
Send the character that reaches their target coordinates first off first, using eNoBlock.
Then send off the other character, using eBlock.