Displaying Speech in an Inventory GUI - SOLVED

Started by JudasFm, Mon 13/09/2004 14:44:13

Previous topic - Next topic

JudasFm

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 :)

Darth Mandarb

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?

JudasFm

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 ???

Sinitrena

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.

JudasFm


Darth Mandarb

Yes, that's what I meant!

Sorry!  It's been awhile since I was actually in AGS using the program!

JudasFm

#6
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 :)

Pumaman

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.

SMF spam blocked by CleanTalk