Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Grapefruitologist on Fri 17/11/2006 06:46:31

Title: How do I display a message while another character is talking?
Post by: Grapefruitologist on Fri 17/11/2006 06:46:31
How do I display a message while another character's talking animation is animating, but make it so the character doesn't say anything, just the animation shows?
Title: Re: How do I display a message while another character is talking?
Post by: monkey0506 on Fri 17/11/2006 06:58:11
cAnimatingchar.LockView(cAnimatingchar.SpeechView);
cAnimatingchar.Animate(cAnimatingchar.Loop, cAnimatingchar.AnimationSpeed, eRepeat, eNoBlock, eForwards);
Wait(GetGameSpeed() * 5);
cAnimatingchar.UnlockView();


Locks ANIMATINGCHAR's view to it's speech view, animates it in its current loop for 5 seconds, then releases it. Presumably you would want to stop the animation when the talking character is done talking so instead of unlocking the view after 5 seconds, you could put this in repeatedly_execute_always:

if ((!cTalkingchar.Speaking) && (cAnimatingchar.View == cAnimatingchar.SpeechView)) // TALKINGCHAR no longer speaking, ANIMATINGCHAR still locked to it's speech view
  cAnimatingchar.UnlockView();
Title: Re: How do I display a message while another character is talking?
Post by: Grapefruitologist on Fri 17/11/2006 07:12:40
Thanks! =D
Oh, also, I forgot to ask: If you're using the MI2 GUI, how do you right-click to change cursor actions?
Title: Re: How do I display a message while another character is talking?
Post by: monkey0506 on Fri 17/11/2006 07:55:36
1) That would depend on which MI2 GUI you're referring to.
2) Since I don't know #1, I can't really give you any good advice, though I haven't looked at those in a long time since I started my own GUI project...which still needs more work now that I bring it up to myself...but I digress.
3) It's really not related to this topic, and because of reasons 1 and 2, you might want to go ask in the proper thread. ;)

Glad I could help with the issue this thread was created for though! :D
Title: Re: How do I display a message while another character is talking?
Post by: Grapefruitologist on Fri 17/11/2006 07:58:51
QuoteThat would depend on which MI2 GUI you're referring to.
Oh no.  ??? xD
Well, thanks, I appreciate the help a lot! =D