Pretty straight forward, I have attributes on my units and one of their abilities should scale with one of those attributes.
The ability grants shields for a short time and I want the shields to be based on a base value + a percentage of the attribute.
So I made a trigger - when any unit uses the ability then a variable gets set to the stack count of the attribute. Then I used a Catalog Field Value set for Behaviors MyBehavior Modification.VitalMaxArray[Shields] to Expression 400+""
I can't use my variable in the expression. I can't use my variable in general. So how can I set the catalog entry to 400+MyVariable?
Because "Catalog Field Value set" takes string. 400 alone will work since it will represent 400, but 400+anything for example: 400+50 will be stored as it is, as "400+50" which is not valid integer.
You need to use,Set catalog field value to 'Convert integer to string (400+X)'
Pretty straight forward, I have attributes on my units and one of their abilities should scale with one of those attributes.
The ability grants shields for a short time and I want the shields to be based on a base value + a percentage of the attribute.
So I made a trigger - when any unit uses the ability then a variable gets set to the stack count of the attribute. Then I used a Catalog Field Value set for Behaviors MyBehavior Modification.VitalMaxArray[Shields] to Expression 400+""
I can't use my variable in the expression. I can't use my variable in general. So how can I set the catalog entry to 400+MyVariable?
Because "Catalog Field Value set" takes string. 400 alone will work since it will represent 400, but 400+anything for example: 400+50 will be stored as it is, as "400+50" which is not valid integer.
You need to use,Set catalog field value to 'Convert integer to string (400+X)'
Thanks, that solved everything.
I can teach myself a lot of things (for example how you do catalog triggers etc.) but I didn't know about the string and integer thing.
Okay, it says the entry is invalid - what should I select to get maximum shields as catalog entry?
Is it possible to do this via data editor?
@IcyJay: Go
Nope.
hmm, kk. Thats sad...
Quote from Scythe1250:
Okay, it says the entry is invalid - what should I select to get maximum shields as catalog entry?
----
Modification.VitalMaxArray[Shields] to Expression 400+""+""
should read:
Modification.VitalMaxArray[2] to Expression 400+""
However, I am upwards of 90% sure you cannot change the value granted by buffs with catalog sets... Not sure why; but that may be your problem.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418