Question on Inter-map Communication

Mindless

New Member
Reaction score
4
Hi everyone,

I am recently creating a custom campaign. I've just finished the first map. Now I want the player to move on the the second map. The problem I have is I've defined a lot of variables storing the properties of my player in the first map, now I want to transfer it all to the second map. Is there a way to save variables in a file or something? And then when the second map initializes, it would read all the variables and set the values accordingly.

Any help would be appreciated.
 

Builder Bob

Live free or don't
Reaction score
249
I haven't used them myself yet, but I believe banks is what will help you with this task. Both maps can use the same bank if I'm not mistaken.

May I ask you how you are able to jump from one map to another? Everything I tested in that area just ended the game.
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
Yes, banks are what you can use. You can open a bank with a certain name, store your units/variables in there (and save the bank) and then retrieve them by opening the same bank in your other map.

You can't store the variable itself, but only the value. So in the end it'd look like this:

JASS:

  Load Bank named "MyBankName"
  Set MyBank = last created bank

  Store unit MyHero with key "hero" in MyBank
  Store integer MyGoldAmount with key "gold" in MyBank

  Save bank MyBank


JASS:

  Load Bank named "MyBankName"
  Set MyBank = last created bank

  Set MyHeroInMission2 = key "hero" from MyBank
  Set MyGoldInMission2 = key "gold" from MyBank


There's some nice video tutorials on banks in mapster:
http://forums.sc2mapster.com/resources/tutorials/2837-video-tutorial-banks/
 

Mindless

New Member
Reaction score
4
I haven't used them myself yet, but I believe banks is what will help you with this task. Both maps can use the same bank if I'm not mistaken.

May I ask you how you are able to jump from one map to another? Everything I tested in that area just ended the game.

Builder Bob, your question is that exact question that I was going to ask.

So everyone, any ideas how to jump from one map to another?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top