Key words when talking.

Started by Icey, Thu 12/05/2011 21:22:41

Previous topic - Next topic

Icey

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

Khris

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.

Icey

Oh, ok. Thanx I will check them out.

SMF spam blocked by CleanTalk