So how do you implement a scary data bank into your map? Well, you need 2 very simple triggers.
Trigger 1:
Start with "Open bank". Note that your bank name cannot use spaces. "My bank" will not work. "Mybank" will. Next, preload the bank. This is required for using banks on Battle.net. Note that you cannot use variables here. You need a seperate trigger action for each player that you want to preload the bank for.
Note that there are 2 parts to each bank file entry. Key and Section. If you want to load a variable, you need to reference the Key and Section that you saved it as. My Key here is "Kills", my section is "Player".
You also need 2 global variables. One for your bank file, I named mine Bank. The other is the variable you want to save.
Trigger 2:
This is the trigger that will record and save our variable. I'm recording number of units killed on the map. Therefore, any unit dying will increase my variable by 1. When this trigger runs, it will also save my variable to the same Key and Section that I loaded from the first trigger.
Lastly, and most importantly, run the Save Bank action to save your variable.
If you play this map, unit deaths will be recorded. If you restart the map, the deaths from the previous session will carry over to this one too.
Great tutorial for new people! I'd recommend making the image links go straight to the image rather than the imageshack page (when you upload a pic, it gives you several links, one of them is the direct one).
Also, the only issue with banks by default is that people can just go in and edit values unless you do some anti-cheat stuff...
I'm Having a lot of trouble with this, i don't know why. It dosent come up with an error at all. But it does not load the Saved integer when you restart the map... i think im making it harder for myself...
Hi,
Sorry for resurecting this thread, but I have a simple question.
Are banks player-specific ? I mean if I open a bank named PANTS for both player 1 and player 2, it will have differents values stored ? Or do I need to create a bank for each named like "BANK(text(PlayerNumber))" and that sorta thing ?
Note that you cannot use variables [to preload banks]. You need a seperate trigger action for each player that you want to preload the bank for.
I overlooked this part first and needed hours to find out why my solution isn't working. Maybe you could highlight that part in your tutorial somehow? Or even better: Add an example with multiple players and banks and add to that your explanation why it's necessary to have each action.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So how do you implement a scary data bank into your map? Well, you need 2 very simple triggers.
Trigger 1:
Start with "Open bank". Note that your bank name cannot use spaces. "My bank" will not work. "Mybank" will. Next, preload the bank. This is required for using banks on Battle.net. Note that you cannot use variables here. You need a seperate trigger action for each player that you want to preload the bank for.
Note that there are 2 parts to each bank file entry. Key and Section. If you want to load a variable, you need to reference the Key and Section that you saved it as. My Key here is "Kills", my section is "Player".
You also need 2 global variables. One for your bank file, I named mine Bank. The other is the variable you want to save.
Trigger 2:
This is the trigger that will record and save our variable. I'm recording number of units killed on the map. Therefore, any unit dying will increase my variable by 1. When this trigger runs, it will also save my variable to the same Key and Section that I loaded from the first trigger.
Lastly, and most importantly, run the Save Bank action to save your variable.
If you play this map, unit deaths will be recorded. If you restart the map, the deaths from the previous session will carry over to this one too.
That's it! How not-scary was that?
Demo map: http://www.sc2mapster.com/assets/bank-system/
I think I just pissed my pants in fear.
Great tutorial for new people! I'd recommend making the image links go straight to the image rather than the imageshack page (when you upload a pic, it gives you several links, one of them is the direct one).
Also, the only issue with banks by default is that people can just go in and edit values unless you do some anti-cheat stuff...
But nonetheless, this is a great "how-to"
Eiviyn helping people? :D
*ruffles Eiviyn's hair* Win
I'm Having a lot of trouble with this, i don't know why. It dosent come up with an error at all. But it does not load the Saved integer when you restart the map... i think im making it harder for myself...
Loading the Bank.. http://starcraftmapping.de/gui.php?id=46
Saving the Bank.. http://starcraftmapping.de/gui.php?id=47
Any help would be nice :)
thx, I didnt know that you had to use preload and synchronize.
@Pshyched: Go
do you use preload and synchronize, like shown here?
Hi,
Sorry for resurecting this thread, but I have a simple question.
Are banks player-specific ? I mean if I open a bank named PANTS for both player 1 and player 2, it will have differents values stored ? Or do I need to create a bank for each named like "BANK(text(PlayerNumber))" and that sorta thing ?
Great Guide! Been looking for a guide on Banks. Always thought they were insanly hard. But something like this is pretty basic and easy thanks.
Just one question. How do I reset the kill count?
Nice guide, and almost painfully simple.
Thanks for this guide. I was afraid to start working on banks, and saved it for last. Its not that scary.
Nice tutorial. It's simple but you also mention something very important:
I overlooked this part first and needed hours to find out why my solution isn't working. Maybe you could highlight that part in your tutorial somehow? Or even better: Add an example with multiple players and banks and add to that your explanation why it's necessary to have each action.