I'm looking for a way to change the amount of armor a unit has through triggers. You can use "set property" to change life, shields, movement speed etc. But not armor.
So it looks like I need to make an upgrade to do it.
I just need to add 1 armor to every unit, for a single player. It looks like you have to manually add every unit to the list of object values. I hope to god there is a better way to do it, but here is what I have for one zergling:
http://radleygh.com/images/SC2Editor_2010-259-17-50-16-54.png
Also removed Zergling from the affected unit array for zerg ground armors/carapace level 1/2/3. The only armor-related upgrade he has is my custom one.
Now, I am using these two actions in the trigger editor to add a level:
Tech Tree - Set Armor (Generic) upgrade level to 2 for player 15
Tech Tree - Add 1 to Armor (Generic) upgrade for player 15
Neither of these change their armor - either in tooltip or reducing actual damage done. There must be another option I missed. I looked through that previously linked armor tutorial, but it was filled with all sorts of non-upgrade related crap and I couldn't find anything of use.
I'd advise you a different approach, especially if you want seperate upgrades for all of your units.
Just go to Data Editor and make a new Behavior of type Buff. Change the following values:
Stats - Flags: [x] Hidden
Behavior - Modification: Unit -> Life Armor Bonus = +1
Then just apply the buff via triggers to any unit:
Unit-Add1ArmorBonusBuffto<Unit>fromplayer0
And you can conveniently remove it that way, too. Only drawback is that the armor rating is (I think) shown as "0 (+1)" and not "1". But that's just a cosmetic difference.
If you want to use the upgrades:
Is it really player 15 who owns the Zergling? It could be that upgrades don't work on the Neutral Hostile player. The triggers you used are correct and the upgrade looks correct too.
Thank you! I didn't even think of buffs. Having 0 +1 is fine for my purpose. I still have the warcraft 3 mindset, having to do everything the stupid way.
Those upgrades were very frustrating, but like you said - it probably is because it was neutral hostile. That didn't cross my mind at all.
Got the triggers working now, thanks to you.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm looking for a way to change the amount of armor a unit has through triggers. You can use "set property" to change life, shields, movement speed etc. But not armor.
So it looks like I need to make an upgrade to do it.
I don't need any off the crap listed here: http://forums.sc2mapster.com/resources/tutorials/1370-data-accumulative-and-multiple-upgrade-with-queue/
I just need to add 1 armor to every unit, for a single player. It looks like you have to manually add every unit to the list of object values. I hope to god there is a better way to do it, but here is what I have for one zergling: http://radleygh.com/images/SC2Editor_2010-259-17-50-16-54.png
I set "Max Level" to 255, and added "Zergling" to the 'Affected Unit Array' ( http://radleygh.com/images/SC2Editor_2010-259-17-50-49-46.png )
Also removed Zergling from the affected unit array for zerg ground armors/carapace level 1/2/3. The only armor-related upgrade he has is my custom one.
Now, I am using these two actions in the trigger editor to add a level:
Tech Tree - Set Armor (Generic) upgrade level to 2 for player 15 Tech Tree - Add 1 to Armor (Generic) upgrade for player 15
Neither of these change their armor - either in tooltip or reducing actual damage done. There must be another option I missed. I looked through that previously linked armor tutorial, but it was filled with all sorts of non-upgrade related crap and I couldn't find anything of use.
I'd advise you a different approach, especially if you want seperate upgrades for all of your units.
Just go to Data Editor and make a new Behavior of type Buff. Change the following values:
Stats - Flags: [x] Hidden
Behavior - Modification: Unit -> Life Armor Bonus = +1
Then just apply the buff via triggers to any unit:
And you can conveniently remove it that way, too. Only drawback is that the armor rating is (I think) shown as "0 (+1)" and not "1". But that's just a cosmetic difference.
If you want to use the upgrades:
Is it really player 15 who owns the Zergling? It could be that upgrades don't work on the Neutral Hostile player. The triggers you used are correct and the upgrade looks correct too.
@s3rius: Go
Thank you! I didn't even think of buffs. Having 0 +1 is fine for my purpose. I still have the warcraft 3 mindset, having to do everything the stupid way.
Those upgrades were very frustrating, but like you said - it probably is because it was neutral hostile. That didn't cross my mind at all.
Got the triggers working now, thanks to you.