Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: myname on Sun 20/01/2008 19:00:17

Title: Solved: Character's animation stops after dialog takes place
Post by: myname on Sun 20/01/2008 19:00:17
Once the dialog starts between my player and NPC the NPC changes o his talking view which in turn has him stop his repeating view which is fine.  It is just that after the dialog stops the NPC will not resume his idle view.  Right now the NPC's animation is scripted like so:
cJasper.Animate(cJasper.Loop, 17, eRepeat, eNoBlock);

any suggestions?  Thank you.
Title: Re: Character's animation stops after dialog takes place
Post by: Radiant on Mon 21/01/2008 12:41:30

function repeatedly_execute () {
  if (cJasper.IsAnimating == false) cJasper.Animate (etc etc etc)
}


Also, there are specific functions for idle loops; look up "idle" in the AGS manual.
Title: Re: Character's animation stops after dialog takes place
Post by: myname on Mon 21/01/2008 19:03:04
Thank you for the reply but when I ue the code in the room script I get the error message:
'.IsAnimating' is not a publc member of 'Character'.
Any ideas or am I just being an idiot?
Title: Re: Character's animation stops after dialog takes place
Post by: Baron on Mon 21/01/2008 19:11:09
As per the manual, the code should read cJasper.Animating, not cJasper.IsAnimating.  But Radiant's right: idle animation would be the easier way.

Baron
Title: Re: Character's animation stops after dialog takes place
Post by: myname on Mon 21/01/2008 19:29:02
Thanks for the reponse BaRon but it is still not working.  The idle animation will not pick back up after the dialog is finished.  I am going to look through the manual again.
Title: Re: Character's animation stops after dialog takes place
Post by: Khris on Mon 21/01/2008 20:05:30
AGS has built in IdleView stuff, I'd use that instead of manually starting an eRepeat animation.
In general, if you want something to happen after a dialog, put a second RunScript action after the one calling the dialog, then put the code in there. (Won't work with 3.0 since you can't assign multiple functions to an event any longer.)
Title: Re: Character's animation stops after dialog takes place
Post by: myname on Mon 21/01/2008 21:10:25
Yea, that was much easier. Thank you KhrisMUC, BaRon and Radiant for your help.