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?
Yes it is possible and you can read more about it HERE (http://www.adventuregamestudio.co.uk/manual/StringFormats.htm) in the manual.
You can use something like this where MyCash is your variable
Display("I have %d Dollars left on my card.",MyCash);
If you need more help on global variables THIS (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=19801.msg241299#msg241299)thread should do the trick.
cEgo.Say("I have $%d left on my card.", GetGlobalInt(x));
i used a graphical variable for that rather than a global one
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"));