I can unitGetProperty life armor, but I can't unitSetProperty life armor.
The final goal will be having characters ranging from 1 armor to 10k armor, so making upgrades seems impossible. I do have a workaround, but it's not as much of a workaround as it's a complete remake of the system.
i've spent a few hours touching upon variables and trying to do it that way, but I might as well just have spent that time crying in a corner because I didn't get anywhere.
I usually convert an integer to a string. If you have upgrades, you could simple use String(getcatalogfieldvalue unit,name,lifearmor +1) essentially, taking the current value, converting it to an integer, adding 1, then converting it back to a string.
You should be able to make truly unlimited upgrades this way.
Okay, what i'm doing is setting the armor value to a variable that will be continually checked
the input I have is CatalogFieldValueSet(c_gameCatalogUnit, "Zeratul", "CUnit_LifeArmor", 7, (IntToText(30)) (the 30 is just to test it out)
I keep getting an error, and it will only display the first line of the error saying that something is wrong. I've narrowed it down to the "CUnit_LifeArmor"
is that what I SHOULD have in there, or did I mess it up horribly?
I know i'm getting a little annoying now, but i've never adjusted catalog values
I am not sure, if you are aware of this, and if this is of relevance for you:
The armor changes this way always affect all units of that type for one player. If you need to increase the armor for single units, you might want to apply behaviors instead.
Is it possible yet?
I can unitGetProperty life armor, but I can't unitSetProperty life armor.
The final goal will be having characters ranging from 1 armor to 10k armor, so making upgrades seems impossible. I do have a workaround, but it's not as much of a workaround as it's a complete remake of the system.
i've spent a few hours touching upon variables and trying to do it that way, but I might as well just have spent that time crying in a corner because I didn't get anywhere.
using setcatalogfieldvalue for a unit, I have been able to change the shield armor value; I haven't tested it with life armor though.
Also, what you could use is an invisible buff to add armor, but then it will display as (+ XXX) opposed to the "white" armor.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
@GlornII: Go
Thanks for the reply
the catalog value seems like it would work, but how would I go about entering a value? i.e. what string would I use for life armor?
I usually convert an integer to a string. If you have upgrades, you could simple use String(getcatalogfieldvalue unit,name,lifearmor +1) essentially, taking the current value, converting it to an integer, adding 1, then converting it back to a string.
You should be able to make truly unlimited upgrades this way.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
@GlornII: Go
Okay, what i'm doing is setting the armor value to a variable that will be continually checked
the input I have is CatalogFieldValueSet(c_gameCatalogUnit, "Zeratul", "CUnit_LifeArmor", 7, (IntToText(30)) (the 30 is just to test it out)
I keep getting an error, and it will only display the first line of the error saying that something is wrong. I've narrowed it down to the "CUnit_LifeArmor"
is that what I SHOULD have in there, or did I mess it up horribly?
I know i'm getting a little annoying now, but i've never adjusted catalog values
Use "LifeArmor".
working code directly out of my map:
@Ahli634: Go
Thank you for the link, now it's "working as intended!"
Was afraid that I'd have to do a massive workaround, but so happy that I don't.
Thank you both for your time
I am not sure, if you are aware of this, and if this is of relevance for you:
The armor changes this way always affect all units of that type for one player. If you need to increase the armor for single units, you might want to apply behaviors instead.