Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: newwaveburritos on Sun 17/01/2021 05:07:49

Title: Returning to speech animation after animating inside a dialog
Post by: newwaveburritos on Sun 17/01/2021 05:07:49
Code (ags) Select
cBartender.LockViewFrame(40,1,0);
  Wait(60);
  cBartender.UnlockView();
  cBartender.LockView(38);


I want the bartender here to make a frowny face when asked a particular question.  He'll frown all right but he won't return to his regular speech view even after I unlock the view in the dialog.  I've tried locking to his speech view (38) afterward as well but it doesn't seem to work even after I end the dialog and begin a new one.  He'll just keep on frowning forever yet his dialog will play.  I tried it as a one frame animation (well, technically two identical frames) with the same result.  I'm not sure what it is I'm missing here.  Thanks for your attention.
Title: Re: Returning to speech animation after animating inside a dialog
Post by: newwaveburritos on Sat 30/01/2021 06:27:41

I've fooled around with it a bit more and noticed if he hit his idle animation it would snap him out of it so to speak.  So, if I add his idle animation after the frowning frame it works more or less as I want it to but he won't animate the idle animation here but it will switch him back to the regular dialog.  I'm still not sure why it's doing this.

Code (ags) Select

  cBartender.LockViewFrame(40, 0, 0, eKeepMoving); //frowning frame
  Wait(50);
  cBartender.UnlockView();
  cBartender.LockView(39); //idle view
  cBartender.Animate(0, 5, eOnce, eNoBlock, eForwards);
  cBartender.UnlockView();