I'm trying to change the flag "Maintain Worker" of a build ability from enabled to disabled, and since this cannot be achieved with upgrades it must be done with triggers. I started experimenting around with catalogs to attempt to get it to work by trying this:
Catalog - Set value of Abilities BuilderBuild FlagArray for player (Triggering player) to "(1|1|0|0|0|0|1|0|0|0|0|0|0|0|0|1|0|0)"
That didn't work and neither did any other variation (e.g. putting commas in between, etc.) of those numbers that I could think of. I then tried the following, where BuilderDummyBuild has the flag settings that I want to achieve on BuilderBuild mid game:
Catalog - Set value of Abilities BuilderBuild FlagArray for player (Triggering player) to (Value of Abilities BuilderDummyBuild FlagArray for player Any Player)
A quick test revealed that the output of the catalog field value get is 0, instead of a specific string of numbers. I got completely lost here and I have no idea what to try in order to get this to work.
How do I set up the catalogs so that I can disable the "Maintain Worker" flag mid game?
As you have figured out, it cannot be done... at all. not through triggers, not through upgrades, not through nodda! You will get an error that you are trying to access something that cannot be changed. (I spent a weekend trying to change flags, a while back).
An annoying work around would be to trigger an ability enable/disable; have 2 of the same ability, 1 with the flag, 1 without. disable and hide 1 ability, and show and enable the other. have the same button on the same command card slot.
I'm trying to change the flag "Maintain Worker" of a build ability from enabled to disabled, and since this cannot be achieved with upgrades it must be done with triggers. I started experimenting around with catalogs to attempt to get it to work by trying this:
Catalog - Set value of Abilities BuilderBuild FlagArray for player (Triggering player) to "(1|1|0|0|0|0|1|0|0|0|0|0|0|0|0|1|0|0)"
That didn't work and neither did any other variation (e.g. putting commas in between, etc.) of those numbers that I could think of. I then tried the following, where BuilderDummyBuild has the flag settings that I want to achieve on BuilderBuild mid game:
Catalog - Set value of Abilities BuilderBuild FlagArray for player (Triggering player) to (Value of Abilities BuilderDummyBuild FlagArray for player Any Player)
A quick test revealed that the output of the catalog field value get is 0, instead of a specific string of numbers. I got completely lost here and I have no idea what to try in order to get this to work.
How do I set up the catalogs so that I can disable the "Maintain Worker" flag mid game?
SCII Profile: http://us.battle.net/sc2/en/profile/2744634/1/Drusus/
"The main reason Santa is so jolly is because he knows where all the bad girls live." - George Carlin
I just tried using an array:
Events
Game - Player Any Player types a chat message containing "-test 1", matching Exactly
Local Variables
i = 0 <Integer>
Conditions
Actions
General - For each integer i from 0 to 20 with increment 1, do (Actions)
Actions
Catalog - Set value of Abilities BuilderBuild FlagArray[i] for player (Triggering player) to "0"
It doesn't work.
SCII Profile: http://us.battle.net/sc2/en/profile/2744634/1/Drusus/
"The main reason Santa is so jolly is because he knows where all the bad girls live." - George Carlin
As you have figured out, it cannot be done... at all. not through triggers, not through upgrades, not through nodda! You will get an error that you are trying to access something that cannot be changed. (I spent a weekend trying to change flags, a while back).
An annoying work around would be to trigger an ability enable/disable; have 2 of the same ability, 1 with the flag, 1 without. disable and hide 1 ability, and show and enable the other. have the same button on the same command card slot.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
That is highly unfortunate and inconvenient. Thanks for saving a weekend of my time :D
SCII Profile: http://us.battle.net/sc2/en/profile/2744634/1/Drusus/
"The main reason Santa is so jolly is because he knows where all the bad girls live." - George Carlin
@NeroClaudiusDrusus: Go
If I remember correctly, they did add a new action/native for this. It is called Set Catalog Flag as Int. I'll double check when I get home.
Add dummy behaviour with trigger which disables ability.