Displaying Variables in Speech

Started by , Fri 09/02/2007 23:15:14

Previous topic - Next topic

Kardin

Hey all, I'm looking for a way to display Global Variables (which I admittedly know very little about) in a speech. When examining the credit card, I want the character (EGO) to say "I have {DOLLARS} left on my card." Is there a way to do that?

Maverick

#1
Yes it is possible and you can read more about it HERE in the manual.

You can use something like this where MyCash is your variable
Code: ags

Display("I have %d Dollars left on my card.",MyCash);


If you need more help on global variables THIS thread should do the trick.

Khris

cEgo.Say("I have $%d left on my card.", GetGlobalInt(x));

Da_Elf

i used a graphical variable for that rather than a global one

monkey0506

Code: ags
Display("You have %d dollars left.", GetGraphicalVariable("money"));
cEgo.Say("I have %d dollars left.", GetGraphicalVariable("money"));
player.Say("I have %d dollars left.", GetGraphicalVariable("money"));

SMF spam blocked by CleanTalk