Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: wtknc on Sat 30/04/2016 20:27:22

Title: Animating inside of dialogue
Post by: wtknc on Sat 30/04/2016 20:27:22
Hello quick question I am trying to animate inside of a dialogue but when I click the correct dialogue option it gives me this error. "AnimateCharacter: invalid loop number specified" Sorry if this question has already been answered elsewhere but I could not find it anywhere.
Here is my code if you need it
Code (ags) Select

// Dialog script file
@S  // Dialog startup entry point
  Display("He looks up at you with a grin.");
  Display("You think he is about to strike");
return
@1
  Display("You lunge forward at him with your knife");
 
stop
@2
  Display("You raise up your arm to block his thrust");
stop
@3
  Display("You quickly jump back");
  player.Animate(10,1,eOnce,eBlock,eForwards);
stop

Thank you in advance.
Title: Re: Animating inside of dialogue
Post by: Slasher on Sat 30/04/2016 20:51:07
LockView.

Example:
Code (ags) Select

cEgo.LockView(12); // Character and View number
cEgo.Animate(0, 0, eOnce, eBlock, eForwards); // Animate loop from View
cEgo.UnlockView(); // Return to player normal View