• 0

    posted a message on [Solved] Bank not loading?

    Im running into an annoying problem where my bank is completely empty every time I restart my map. To clarify the issue, I can confirm that I am saving the bank, and later within the map I am checking if those values that I just saved are still indeed there; and they are. I can also confirm that the values are indeed in my BANK_NAME.SC2Bank file. However when I launch my game, I am getting a 0 sections counted when I try to debug why there is nothing in the bank.

    Here is how I PRELOAD the bank at the beginning of my map:

         Bank - Preload and synchronize bank BANK_SCORE for player 1
    

    where BANK_SCORE is a constant string defined in the variable list.

    Now here is where I LOAD the bank, and attempt to check if I have any sections:

            Bank - Open bank BANK_SCORE for player 1
            Debug - Display (Combine ("section count: ", (Text((Count of sections in bank (Last opened bank)))))) as debug output using Type 01, and Do display it in the game window
    

    Every time, I get "section count: 0", and there is no need to show the rest of my loading code because at that point I know I have failed.

    Is there some sort of 'gotcha' with banks that I am not seeing?

    Edit: Another weird bug I am seeing is that every time I save the bank, it creates a whole new XML file with only the properties I saved from that session and does not keep the values that were inserted from a previous run from the map. This makes me think that somehow I am deleting the file right at the beginning of loading my map or something.

    Posted in: Triggers
  • 0

    posted a message on Unit Type null in User Type?

    @riftgarret: Go

    Oh the pains of programming, it was because I was using. 'User Data (Game Link)' and not 'User Data (Unit)'

    Posted in: Triggers
  • 0

    posted a message on Unit Type null in User Type?

    Has anyone experienced this odd behavior with unit types before? My User Type I have defined works in every field except for 'Unit Type'. Here I have a User Type defined that uses 'Unit' as a field and for some reason it always comes back as an empty string when i extract it out inside of a method using:

    Variable - Set unitType = (User Data (AttackUnitStack, attackWaves[timerIndex], unit, forIndex))

    Variable - Set unitCount = (User Data (AttackUnitStack, attackWaves[timerIndex], count, forIndex))

    Variable - Set upgrade = (User Data (AttackUnitStack, attackWaves[timerIndex], upgrades, forIndex))

    I get: "", 4, "SheildWall"

    Whereas I have an 'upgrade' game link that works perfectly fine in this set of calls.

    Posted in: Triggers
  • 0

    posted a message on [SOLVED] how to detect if command center -> orbital

    @FaithAnoe: Go

    Thank you, I ended up using that to detect when it was being built, then i set a Custom Value :

    Unit - Set (Triggering unit) custom value 0 to 1.0

    Posted in: Triggers
  • 0

    posted a message on [SOLVED] how to detect if command center -> orbital

    Is there any property of the unit that can be checked to see if a Command Center, is morphing into an Orbital or PF? Is there no other way that trying to just capture the events with triggers?

    Ive noticed that the unit type, stays at CC until the orbital finishes, and that the queued unit in training is NULL while its being built..

    Posted in: Triggers
  • 0

    posted a message on Whats the best way to organize an array of values?

    This is exactly what I was looking for, thank you!

    Posted in: Triggers
  • 0

    posted a message on Whats the best way to organize an array of values?

    Problem: There is an array of integers up to 50 for storing configuration values that a player has made so that they can store it into the bank and reload it if necessary.

    Current solution (cumbersome): Define 50 constants integers, such that when i access elements of that configuration array i would access them such as: config[NUMBER_OF_LIVES] = 4 config[DIFFICULTY_LEVEL] = 5

    The problem with this approach, is that within Galaxy, its a serious PITA to create all of the constants and give them incremented values. Along with that, if I need to insert another config property into the middle of the array (for sake of data organization), I have to redo all of the values for the constants that are above the value that is inserted.

    What are best practices for managing large amounts of similar data within Galaxy, that also make them easy to store and reload from the bank?

    Posted in: Triggers
  • To post a comment, please or register a new account.