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:
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.
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.
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..
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?
0
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:
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:
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.
0
@riftgarret: Go
Oh the pains of programming, it was because I was using. 'User Data (Game Link)' and not 'User Data (Unit)'
0
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.
0
@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
0
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..
0
This is exactly what I was looking for, thank you!
0
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?