Hello,
I have been trying and cannot seem to make this work. I need so to speak a damage counter, to see how much damage a unit deals in total.
I have added an attribute DamageDealt to the unit and created the following trigger:
Event - Any unit starts attacking.
Action - Add (Round (( Triggering damage amount))) DamageDealt to (Attacking unit) from (???) .
I have tried different things in the ??? but nothing seems to work. I am rounding the damage, as I think damage is a real number, and behaviors are integer.
Can anyone help with this, I am lost here and cannot figure out why this isn't working ?
Hello again, it has been long time, but I have been away. I still cannot make this work. I will give detailed information now, and hope somebody can point me to my mistake(s). Thanks in advance.
Here it goes:
I have created a map, with 1 marine and a lot of lings. In data editor, I have added a behavior "DamageDealt" of type "Attribute" to the marine unit. It is displayed in the marine info panel "DamageDealt:0". It does not modify anything, it is just a counter. I haven't added anything else. ( Q: Do I have to make the marine a Hero to have working attributes? )
For the purpose of the test, I have modified the trigger to just count the number of attacks (or at least I though I have...). Here is the trigger I used:
DamageDealt
Event: Unit - Any Unit takes Fatal or Non-Fatal Any damage (from Any effects)
Local Variables:
Conditions:
Actions: Unit - Add 1 DamageDealt to (Damaging unit) from player 1
And when the marine attacks, the DamageDealt counter does not change.
What am I doing wrong ?
Is the trigger incorrect, or the behavior(Attribute), or is it something I should edit in the Marine unit in Data editor ?
I have been stuck on this issue for quite a while, and I would appreciate any help.
For some unknown reason, attributes cannot be added directly. To increase an attribute, you need to use a second behavior of type "Buff" with an appropiate stack count, which provides a bonus to the desired attribute.
Hello, I have been trying and cannot seem to make this work. I need so to speak a damage counter, to see how much damage a unit deals in total. I have added an attribute DamageDealt to the unit and created the following trigger:
Event - Any unit starts attacking. Action - Add (Round (( Triggering damage amount))) DamageDealt to (Attacking unit) from (???) .
I have tried different things in the ??? but nothing seems to work. I am rounding the damage, as I think damage is a real number, and behaviors are integer. Can anyone help with this, I am lost here and cannot figure out why this isn't working ?
@theINNsane: Go
use -> Event - Unit takes lethal or non-lethal damage.
The event that you specified doesn't have any damage registered yet. the unit starts to attack, it has't hit or attacked anything yet.
@Helral: Go
Hello again, it has been long time, but I have been away. I still cannot make this work. I will give detailed information now, and hope somebody can point me to my mistake(s). Thanks in advance.
Here it goes: I have created a map, with 1 marine and a lot of lings. In data editor, I have added a behavior "DamageDealt" of type "Attribute" to the marine unit. It is displayed in the marine info panel "DamageDealt:0". It does not modify anything, it is just a counter. I haven't added anything else. ( Q: Do I have to make the marine a Hero to have working attributes? ) For the purpose of the test, I have modified the trigger to just count the number of attacks (or at least I though I have...). Here is the trigger I used:
DamageDealt
Event: Unit - Any Unit takes Fatal or Non-Fatal Any damage (from Any effects)
Local Variables:
Conditions:
Actions: Unit - Add 1 DamageDealt to (Damaging unit) from player 1
And when the marine attacks, the DamageDealt counter does not change.
What am I doing wrong ? Is the trigger incorrect, or the behavior(Attribute), or is it something I should edit in the Marine unit in Data editor ?
I have been stuck on this issue for quite a while, and I would appreciate any help.
For some unknown reason, attributes cannot be added directly. To increase an attribute, you need to use a second behavior of type "Buff" with an appropiate stack count, which provides a bonus to the desired attribute.
@Kueken531: Go
Oh wow, that was it really. Thanks a lot !!! :)