I HAVE GOT THIS TO WORK!!!!
DOING A LITTLE CAT DANCE!!!! ^^
IT'S BEAUTIFUL!!!! I'M SO EXCITED!!!!
My script in game.script:
global MoneyAmount = 0;
method AddMoney(AddAmount)
{
if(MoneyAmount==null) MoneyAmount = 0;
if(AddAmount==null) AddAmount = 0;
MoneyAmount = MoneyAmount + AddAmount;
global overlay = Game.LoadWindow("scenes\Kolobok\overlay.window");
var MoneyDisplay = overlay.GetControl("money");
MoneyDisplay.Text = "$" + ToString(MoneyAmount);
}
Overlay is the window where the control money holds the pic of the gold and the amount. : )
and on the object that calls this method---a window the player is exploring with his/her greedy little hands:
on "LeftClick"
{
Game.Msg("It's a dirty window but you find some gold." );
Game.AddMoney(5);
}
Of course my gold has a $ sign before it--how American in a medieval world. But I love it. I deeply and truly appreciate all the help I get here---I really need it but there is nothing so exciting as figuring something out yourself--albeit Mnemonic gave me the code in that post---I had to figure out how to tie it into my window.
: ) ) ) ) )
What can the player buy in my world now for $5 medieval dollar gold pieces? Nothing. Because I havent' put the script in yet, but I know how to do it now. : ) At least, I think so. : ) Or a sweet little monster may pick their pocket. : )
Since I'm afraid to take that $ sign out, I will have to explain it in the story---this world deals in Sigils -- that's the name of the gold pieces and the sign for Sigils is well, $. : )