Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: ClearlyBrogan on Mon 12/06/2023 22:26:37

Title: Sierra speech & animation
Post by: ClearlyBrogan on Mon 12/06/2023 22:26:37
Hii! So I'm making a game with real people as sprites and using the sierra with transparent background speech type.

I'm not sure how I'd animate an npc to do a certain animation at the start of the dialogue options.

for example npc is sat in chair, you click to iniate dialogue and the npc will turn to the side and put her arm on the table, freeze that view during dialogue and then reset once dialogue options have ended.

its probably super simple but I'm new and my brain doesn't seem to want to compute

any help is appreciated!
Title: Re: Sierra speech & animation
Post by: heltenjon on Tue 13/06/2023 09:56:22
In the dialogue script, you can use normal script commands if you start a line with a space or two. You should be able to use this to add this animation/change view at the start of the dialogue, and remove it when your character says "bye" to end the conversation.

Does that help any?
Title: Re: Sierra speech & animation
Post by: Khris on Tue 13/06/2023 14:13:40
You don't need to put the code inside the dialog script:

function cNpc_Talk() {
  cNpc.LockView(NPC_ARMONTABLE);
  cNpc.Animate(..., eBlock, ...);
  dNpc1.Start(); // start dialog
}

To make them turn back:
// inside Room_RepExec
  if (cNpc.View == NPC_ARMONTABLE) {
    cNpc.Animate(..., eBlock, eBackwards, ...);
    cNpc.UnlockView();
  }