Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: JudasFm on Mon 13/09/2004 14:44:13

Title: Displaying Speech in an Inventory GUI - SOLVED
Post by: JudasFm on Mon 13/09/2004 14:44:13
I've checked and rechecked the manual, but I'm a little stumped on this one.Ã,  What I want is when the player interacts with an inventory item, to have the character describe it; example:

Player LOOKS at flashlight
Character says "This is a blue flashlight."

The problem is whenever the character speaks, the text is underneath the inventory window.Ã,  I've tried DisplaySpeechAt and that works up to a point, but it's very clumsy.Ã,  What I really want is for the speech to be above the GUI and centred over the object in question.Ã,  Is there a way to do this and if so, can someone please point me in the right direction?Ã,  Thanks :)
Title: Re: Displaying Speech in an Inventory GUI
Post by: Darth Mandarb on Mon 13/09/2004 16:23:39
Inside the GUI you created for your inventory put a 'blank' area above it.  In that blank area put a textfield.  When you want the player to describe the item, just put the text you want him (her) to say inside the textfield.

You can format the textfield to use the same font/color as the player's speech.

Would that work for you?
Title: Re: Displaying Speech in an Inventory GUI
Post by: JudasFm on Mon 13/09/2004 16:59:31
Sort of, but I can't figure how to program the different texts in; that's kind of the problem here ??? Again, I double checked the manual but it doesn't really help...I can do it on DisplaySpeechAt, but like I said, it would be nice if there was an easier way :)

Also, from what I can make out from the manual, text fields seem to be more for the player to type in words/commands rather than the character to say them.  Maybe that's just me reading it wrong though ???
Title: Re: Displaying Speech in an Inventory GUI
Post by: Sinitrena on Mon 13/09/2004 18:37:55
I think Darth meant a Lable, not a Textbox. Well, that's the way I would do it.  Use "SetLableText" when the player looks at the specific inventory item, use a "Wait" after that and than "SetLableText" again to reset the lable to a blank line. Hope that helps.
Title: Displaying Speech in an Inventory GUI - SOLVED
Post by: JudasFm on Mon 13/09/2004 21:27:25
Okay, I'll try that :) Thanks!
Title: Re: Displaying Speech in an Inventory GUI - SOLVED
Post by: Darth Mandarb on Tue 14/09/2004 04:27:16
Yes, that's what I meant!

Sorry!  It's been awhile since I was actually in AGS using the program!
Title: Re: Displaying Speech in an Inventory GUI - SOLVED
Post by: JudasFm on Tue 14/09/2004 09:19:18
Nope, can't seem to make it work.Ã,  Never mind; I'll have to do it the old fashioned way :) Thanks anyway

EDIT--Actually, I experimented with CreateTextOverlay and that seemed to work alright...still not perfect, but it keeps the continuity :)
Title: Re: Displaying Speech in an Inventory GUI - SOLVED
Post by: Pumaman on Wed 15/09/2004 20:42:48
The issue you have here is that GUIs are always displayed above text overlays, so if the speech is displayed while the inventory window is on, it will get 'hidden' behind the GUI.

Allowing you to change the Z-order of text ovrlays is on my to-do list.