character animation during conversation

Started by ediman, Wed 30/09/2009 12:53:09

Previous topic - Next topic

ediman

Hi Everyone

I've problem with my game

there are two persons eg.: robot and wolf

and script is:

function room_FirstLoad()
{
Wait(80);
cRobot.Say("hallo");
Wait(40);
cWolf.Say("hi");
Wait(40);
cRobot.Say("what is going on?");
Wait(40);
cWolf.Say("great man");
Wait(40);
}
this conversation I want to play once, next time when you entry into this room persons will just stay don't speak

ofcourse I made views:

Robot normal and speak and the same with Wolf

function room_AfterFadeIn()
{
cRobot.ChangeView(3);
Robot.Animate(cYellowRobot.Loop, 5, eRepeat, eNoBlock);
}

Both normal and speaking view Robot is smoking cigarette so important is to animate smoke before, during and after conversation

What is happen now?

everythink is okey except Wolf starts to speak, in this time Robot's animation is stoping.

well thanks for any help

ps: sorry my english I'm not native (polish rulez;)

EdiMan




Khris

You need the Character.SetIdleView command.

In the roomLoad function, add this:

Code: ags
  cRobot.SetIdleView(3, 0);


cRobot will now animate using view 3 all the time, even during blocking sequences.

Note that the only way to change the speed of an idle view animation is to change all the frames' delays (afaik).
Since that delay seems to be hard-coded to something like 10, use a frame delay of -8 for all frames to make it play using a delay of 2 game loops.

ediman

Hej Khris it really works
so thanku man
now I try to understand dialogs
EdiMAn

Khris

You're welcome, and welcome to the forums :)

SMF spam blocked by CleanTalk