Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Icey on Thu 12/05/2011 21:22:41

Title: Key words when talking.
Post by: Icey on Thu 12/05/2011 21:22:41
Is there any way to set key words for when people are talking? Like if the player did not have a pin and the NPC told them to check there inventory. the inventory word should appear red or what ever color I want.

Do I have to use variables?

Might be something like good.
string text.color = 63488;

cEgo.Say("Hello, Welcome to the %CStore%C.", text.color);

(Hello, Welcome to the store.)
Title: Re: Key words when talking.
Post by: Khris on Thu 12/05/2011 21:37:42
You can not do this using built-in functions.
SSH's Display module can do a load of special effects, not sure about speech though.

It's not too hard to a) replace the .Say function with your own, then b) include the described functionality.

Basically, DrawString to a DynamicSprite and display it using a Graphical Overlay or a GUI.
In order to recolor specific words you have to do your own line-wrapping. Monkey's String module might come in handy.
Title: Re: Key words when talking.
Post by: Icey on Thu 12/05/2011 21:57:27
Oh, ok. Thanx I will check them out.