Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Anarcho on Sat 13/08/2005 01:25:10

Title: inventory gui / speech question
Post by: Anarcho on Sat 13/08/2005 01:25:10
Hi, I just made my first custom inventory GUI and I've come across one problem.  When I look at an object in the inventory, the character's speech is displayed behind the GUI and off to the side.  Is there a way I can set the speech to always be directly below the GUI when the inventory is open, or have the inventory GUI disappear while the character is describing what's in there?

I've been looking through the manual and functions for an answer, but haven't found one...
Title: Re: inventory gui / speech question
Post by: Kweepa on Sat 13/08/2005 02:40:49
You need to make the interaction "run script".
Then you can just turn off the GUI before displaying the speech, and turn it back on again afterwards.
Title: Re: inventory gui / speech question
Post by: Anarcho on Sat 13/08/2005 02:47:10
Where exactly do i do this?  Do I do a script for each inventory item that shuts off the GUI?  Is that what you mean?
Title: Re: inventory gui / speech question
Post by: Kweepa on Sat 13/08/2005 03:22:43
Yes - for every inventory interaction, you need to have a script function rather than using the visual scripting.
Title: Re: inventory gui / speech question
Post by: Ashen on Sat 13/08/2005 13:28:16
If you're scripting anyway, you could use DisplaySpeechAt()/Character.SayAt() to position the speech below the GUI, rather than switching it off and on for every item.
Title: Re: inventory gui / speech question
Post by: Anarcho on Mon 15/08/2005 04:59:52
Ok, I got this to work---thanks!
Title: Re: inventory gui / speech question
Post by: Gilbert on Mon 15/08/2005 05:19:34
Or you can make an extra invisible character, which is always moved to the current room, and positioned below the GUI (since character position uses room coordinates, remember to add the ViewportX/Y in case you have a scrolling room) whenever the inventory window is opened and make him speak, that may save you from some scriptings.