Solved: Character's animation stops after dialog takes place

Started by myname, Sun 20/01/2008 19:00:17

Previous topic - Next topic

myname

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.

Radiant

Code: ags

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.

myname

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?

Baron

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

myname

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.

Khris

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

myname

Yea, that was much easier. Thank you KhrisMUC, BaRon and Radiant for your help.

SMF spam blocked by CleanTalk