??? G'day.
I'm making a room where I want a tourist guide showing people around. He's meant to say things every now and then, a bit like the spitmaster in MI2.
Timers work nicely enough to get the speech going. However,
- if I use the DisplayBackgroundSpeech function, the talking animation doesn't play while the tourist guide talks.
- if I just use DisplaySpeech the animation runs, but then again, control over the player character is lost.
Does anyone know of a way to display the speech in the background, while the talking animation plays and control over the main character is not lost?
Thanks.
Maybe you could do this:
SetCharacterView(CHARID,talkview);
AnimateCharacter(CHARID,loop,speed,???);
DisplaySpeechBackground(CHARID,text);
The problem is how to stop the animating when the character has stopped talking... Maybe the wiser ones have a solution for this...
Yeah, I had actually tried that already, to change the view back I was using another SetCharacterView, but it doesn't work out well. It's not well syncronised.
Thanks anyway. We'll wait for the wiser ones.
You can use the next method:
int text_id =-1; //stores text overlay id (-1 means none)
function StartDisplaySpeeching(...) {
SetCharacterView(CHARID,talkview);
AnimateCharacter(CHARID,loop,speed,???);
text_id = DisplaySpeechBackground(CHARID,text); //get text overlay_id
}
then inside repeatedly_execute of the room:
function room_*() {
if (text_id > -1 && IsOverlayValid(text_id)==0) {
ReleaseCharacterView(CHARID); //stop animation
text_id =-1; //reset text_id
}
}
Hope it helps ;)
-Cheers