Add1000$tobankEventsGame-PlayerAnyPlayertypesachatmessagecontaining"money",matchingExactlyLocalVariablesConditionsActionsBank-Openbank"Bank of Agria"forplayer1Bank-Storeinteger1000as"Money"ofsection"Player1"inbank(Lastopenedbank)Bank-Savebank(Lastopenedbank)Dialog-SetMoneyscreentexttextto("Money: "+(Text((Load"Money"ofsection"Player1"frombank(Lastopenedbank)asintegervalue))))for(Allplayers)
Problem:
When I type "money" it adds 1000. But when I type "money" again value is still 1000. Any idea whats wrong? Can I tell bank somehow to - (minus)or + (plus) money somehow? What "Store" actually means? Is it same as "+"?
Anyways, "store" basically means "set". If you want it to add 1000, then use an arithmetic function (1000 + ((Load "Money" of section "Player1" from bank), etc.
Now I have working system. (=screen that shows amount of money in bank) but when I close the map and open it again "money" value is still 0. So my system does something wrong. If I had 4000$ before I closed my map and when I open it again I should have that 4000$ - not 0.
I have and idea to add somekind of money system for my campaign and I need to store money (or something else) amount between maps.
Also where can I find actual bank file on my computer?
I have 2 Varibles:
Money screen (Background) = No Dialog <Dialog>
Money screen text = No Dialog Item <Dialog Item>
3 Triggers:
Open bank
Create money screen
Add 1000$ to bank
Problem:
When I type "money" it adds 1000. But when I type "money" again value is still 1000. Any idea whats wrong? Can I tell bank somehow to - (minus)or + (plus) money somehow? What "Store" actually means? Is it same as "+"?
I lol'd at how your bank is actually a bank.
Anyways, "store" basically means "set". If you want it to add 1000, then use an arithmetic function (1000 + ((Load "Money" of section "Player1" from bank), etc.
Thanks for help. New line is:
Now I have working system. (=screen that shows amount of money in bank) but when I close the map and open it again "money" value is still 0. So my system does something wrong. If I had 4000$ before I closed my map and when I open it again I should have that 4000$ - not 0.
I have and idea to add somekind of money system for my campaign and I need to store money (or something else) amount between maps.
Also where can I find actual bank file on my computer?
Try uploading the map online and then testing it. I don't believe that banks save in test mode
They do.
As far as i can see, you forgot to open the bank bevore setting the dialog item text.
Found bank files from:
C:\Users\Terhonator\Documents\StarCraft II\Banks
Did lot of testing and now everything works well:
My triggers:
Updated map file.
I'm not sure is it necessary to have all 3 (preload, open and save) functions but it seems to work.
I did all testing offline so online or offline doesn't matter.
EDIT: Updated map file again