hey, im looking for a way to trigger life, armor and speed, maybe more like regen, im planing on useing integer for making it easy to change. dose anybody know i smart way to do that, then it will be much appreciated.
Here's a fine way to do it . This one I just copied from a wave-spawning trigger I created, but it shows the idea to use local variables to store the values. It's particularly very nice if you are looking to i.e. spawn the units for multiple players but only want to edit the values one place in your trigger code when editing it for balance or whatever. (In this example player 0 is the hostile waves). All found under the Set unit property.
Local variables
Unit = Zealot <Game Link - Unit>
Amount = 10 <Integer>
Life = 16.0 <Real>
Shield = 16.0 <Real>
Speed = 4.0 <Real>
Actions
General - If (Conditions) then do (Actions) else do (Actions)
:If
::(Status of player 1) == Playing
:Then
::Unit - Create AmountUnit for player 0 at (Center of Region) using default facing (No Options)
::Unit Group - Pick each unit in (Last created units) and do (Actions)
::Actions
:::Unit - Set (Picked unit) Maximum Life to Life
:::Unit - Set (Picked unit) Life to Life
:::Unit - Set (Picked unit) Maximum Shields to Shield
:::Unit - Set (Picked unit) Shields to Shield
:::Unit - Set (Picked unit) Movement Speed to Speed
:::Unit - Order (Picked unit) to ( Move targeting (Center of Region)) (Replace Existing Orders)
That's it, and if you're doing waves for multiple locations that should be identical, just copy it all into a new "if then else" action with another player in the if section. For some things like regen though you might have to use some more complicated functions to edit the dataset. For example if you want to edit the regen rate for Zerglings you'll need a local variable to store whatever regen rate you wish, probably best use a real datatype. Then try something along the lines of:
Catalog - Set value of Units "Zergling" "LifeRegenRate" for player 1 to (String(Regen) with Any Precision decimal places) <- not totally sure about the "LifeRegenRate" but I think that's it... Also, the "Regen" is the name of the variable to store the value for what regen-rate you want, and it has to be stored as a string in the dataset so have to convert it with the String function. Let me know if you get it to work.
You can also set things like the unit's scale, by using "Set Unit Scale". Almost anything can be changed, it's just a matter of figuring out which action to use.
hey, im looking for a way to trigger life, armor and speed, maybe more like regen, im planing on useing integer for making it easy to change. dose anybody know i smart way to do that, then it will be much appreciated.
Health and speed can both be changed using the "Set Unit Property" action, and can be called as reals using the "Unit Property" function.
I don't know if it can be done for armor.
Here's a fine way to do it . This one I just copied from a wave-spawning trigger I created, but it shows the idea to use local variables to store the values. It's particularly very nice if you are looking to i.e. spawn the units for multiple players but only want to edit the values one place in your trigger code when editing it for balance or whatever. (In this example player 0 is the hostile waves). All found under the Set unit property.
That's it, and if you're doing waves for multiple locations that should be identical, just copy it all into a new "if then else" action with another player in the if section. For some things like regen though you might have to use some more complicated functions to edit the dataset. For example if you want to edit the regen rate for Zerglings you'll need a local variable to store whatever regen rate you wish, probably best use a real datatype. Then try something along the lines of:
Catalog - Set value of Units "Zergling" "LifeRegenRate" for player 1 to (String(Regen) with Any Precision decimal places) <- not totally sure about the "LifeRegenRate" but I think that's it... Also, the "Regen" is the name of the variable to store the value for what regen-rate you want, and it has to be stored as a string in the dataset so have to convert it with the String function. Let me know if you get it to work.
You can also set things like the unit's scale, by using "Set Unit Scale". Almost anything can be changed, it's just a matter of figuring out which action to use.