Basically i want to increase unit damage proportionally to the number of same unittype on the map.
so 40 units is = to 40 damge
Only applies to this unittype "Believer"
Ive already tried serveral methods to do this, they work, but all cause lag.
i think im going to have to user triggers, but i would like it to work in the
data editor. but...
Hopefully somebody can help or point me in the right direction.
all data only solutions would be a pain to create.
either use catalogs or upgrades to set the dmg. now just have a trigger that runs everytime your unit is starting to attack.
either do a number of units in unitgroup or track(save) the number of your unit type on creation (+1) and death (-1) in a variable. i prefer upgrades over catalogs because catalog triggers overwrite upgrades which can be a pain, but catalogs are more flexible when it comes to math and formulas.
Basically i want to increase unit damage proportionally to the number of same unittype on the map.
so 40 units is = to 40 damge Only applies to this unittype "Believer"
Ive already tried serveral methods to do this, they work, but all cause lag. i think im going to have to user triggers, but i would like it to work in the data editor. but...
Hopefully somebody can help or point me in the right direction.
all data only solutions would be a pain to create.
either use catalogs or upgrades to set the dmg. now just have a trigger that runs everytime your unit is starting to attack. either do a number of units in unitgroup or track(save) the number of your unit type on creation (+1) and death (-1) in a variable. i prefer upgrades over catalogs because catalog triggers overwrite upgrades which can be a pain, but catalogs are more flexible when it comes to math and formulas.
@FunkyUserName: Go
Thanks a ton @FunkyUserName,
I got it to work with this.
added upgrade and max level. specified wich weapon to upgrade and how much damage to display.(and do!), Then i added
Event Unit construction finishes.
Condition unit-type=believer
Action
Techtree - Add one to "believer upgrade" for player "owner of triggering unit"
raw data
removebelieverdamage Events TriggerAddEventUnitRemoved(null) TriggerAddEventUnitDied(null) Local Variables Conditions Comparison((UnitGetType((EventUnit()))), ==, "Believer") Actions TechTreeUpgradeAddLevel((UnitGetOwner((EventUnit()))), "BelieverUpgrade", -1)
Thanks again. and this issue is solved.