Sierra speech & animation

Started by ClearlyBrogan, Mon 12/06/2023 22:26:37

Previous topic - Next topic

ClearlyBrogan

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!

heltenjon

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?

Khris

You don't need to put the code inside the dialog script:

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

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

SMF spam blocked by CleanTalk