Character walk after dialog and face direction

Started by Licht61, Wed 03/02/2021 18:26:39

Previous topic - Next topic

Licht61

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
 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
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.



eri0o

That walk is not blocking you need to wait somehow before turning the characters head.

Khris

Send the character that reaches their target coordinates first off first, using eNoBlock.
Then send off the other character, using eBlock.

SMF spam blocked by CleanTalk