Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Edward Becket on Mon 28/07/2003 21:22:02

Title: Walk+ speak
Post by: Edward Becket on Mon 28/07/2003 21:22:02
How it is possible, if it is?
Title: Re:Walk+ speak
Post by: Barcik on Mon 28/07/2003 22:40:03
Do you mean the two should happen at the same time, or one after another?
Title: Re:Walk+ speak
Post by: Gregjazz on Tue 29/07/2003 03:25:20
If you want to have the walking and speaking at the same time, you could do this:

Make an animation of a character walking and talking at the same time. Use the 'SetCharacterView' to change the character's normal walking view to the 'walking and talking' view. Then use the 'DisplaySpeechBackground' function. Your script should look something like this:

 SetCharacterView (EGO, 15);
 MoveCharacter (EGO, 250, 150);
 DisplaySpeechBackground (EGO, "Hello, world!");
 while (character[EGO].walking) Wait (1);
 ReleaseCharacterView (EGO);

You can use the RemoveOverlay to remove the background text. The overlay ID is returned by the command.

Correct me if I'm wrong. I just made this off of the top of my head.
Title: Re:Walk+ speak
Post by: aussie on Tue 29/07/2003 09:22:19
I've tried that sort of stuff myself before, giving up miserably. Geoffkhan's idea looks pretty good, though, so long as you don't mind losing cntrol of the main character while the "wait" function is taking place.
Title: Re:Walk+ speak
Post by: Edward Becket on Tue 29/07/2003 12:27:09
I have not tried that yet, but ... thanks ^_^