Right, this is probably easily done, but I've spent the last two days playing with data, triggers, and lots of random hero attributes to make this work. And so far it hasn't. I need to change the damage a unit does via triggers.
(I figured out a really retarded (laggy) way to make it work, but all units with the same weapon also gets the damage bonus. I want it so that if one unit using the same weapon does 50 damage, the other one can do 999999 damage or something.)
You cannot directly modify the damage a single unit does with a specific weapon via trigger. However, depending on the application, there are a couple of possible workarounds, for example:
A trigger catching the damage event (or a generic effect, if the damage is variable at all times) for this specific weapon, which checks your damage source for some indication how much damage it should do (behavior, attributes, custom value...), then uses the UnitDamage function to cause as much damage as you need.
A behavior system, increasing the damage of the unit it got applied to. If multiple weapons or damaging abilities are involved and only one should be increased, use the different damage types to differentiate (make behavior only increase Melee damage, set the affected weapon to Melee and unaffected Weapons/Abilities to Ranged/Spell/Splash)
Multiple damage effects, if the different amounts of damage are fixed and limited, you can use a switch effect for your weapon executing one of multiple damage effects, possibly using a behavior to indicate which one to be used.
These would probably make the most sense, I could think of a couple more ways.
this calculation doesnt make a lot of sense.. so it's just basic_damage * (var/2) and considering 2 is a constant you always have its value.
with that said you can just add X stacks of the same behavior that adds Y damage
ex.
set a behavior that adds 10 fixed damage and make it stackable
10 damage = 1 stack
20 damage = 2 stacks
etc
or if you want to add the /2 just give a basic unit damage (10) and then use the behavior to add 5 damage for each stack
Right, this is probably easily done, but I've spent the last two days playing with data, triggers, and lots of random hero attributes to make this work. And so far it hasn't. I need to change the damage a unit does via triggers.
(I figured out a really retarded (laggy) way to make it work, but all units with the same weapon also gets the damage bonus. I want it so that if one unit using the same weapon does 50 damage, the other one can do 999999 damage or something.)
Thanks in advance about this stupid question :D.
You cannot directly modify the damage a single unit does with a specific weapon via trigger. However, depending on the application, there are a couple of possible workarounds, for example:
These would probably make the most sense, I could think of a couple more ways.
Hm. I'll try them see how it goes. But I wanted the damage to be calculated depending on a certain variable. (Base Weapon Damage x Variable/2)
this calculation doesnt make a lot of sense.. so it's just basic_damage * (var/2) and considering 2 is a constant you always have its value.
with that said you can just add X stacks of the same behavior that adds Y damage
ex.
set a behavior that adds 10 fixed damage and make it stackable
10 damage = 1 stack
20 damage = 2 stacks
etc
or if you want to add the /2 just give a basic unit damage (10) and then use the behavior to add 5 damage for each stack
@Bibendus: Go
Ah works like a charm. Thanks. I love youuuuuu
<3
Can you please add [solved] in the topic title? ;)