iplaystarcraft said:
2- Event-Unit is attacked
Condition- attacked unit equal to MyVariableA
Action-Set MyVariableB = attacking unit
-wait .37 seconds
-set MyVariableB = No Unit
3-Event-Unit is attacked
Condition- attacking unit equal to MyVariableA
Action- If Alll Coditions Are True do Then Actions else Do else Actions
If Conditions-Attacked unit equal to MyVariableB
Then Actions-**i couldn't find a trigger that does a % of damage**
-Set MyVariableB's hp to MyVariableB's hp - *x number*
-**make a dummy spell based on evasion with no icon and 100% probabilty**
-add *dummy spell* to MyVariableA
-wait.05
-reomove *dummy spell* from MyVariableA
~iplaystarcraft
those two triggers are abusable. Take a look at them, they have same event and condition. So it will be executed in 'same time', and we don't know which one is actually first. So, when this code executed:
If Conditions-Attacked unit equal to MyVariableB
It may notice that MyVariableB is nothing, so it return false. Since we don't know, is this action already executed:
Action-Set MyVariableB = attacking unit
iplaystarcraft said:
Then Actions-**i couldn't find a trigger that does a % of damage**
There are no trigger for this. You must calculate your hero attack damage based on his prim. attr., attack damage base, number of dice, attack bonus per dice, item bonus damage, buff that affecting attack damage (positive n negative) which is really hard.
it's hard to detect an unit attack damage
IF that unit not damage anything with his attack. So far, i just figure it out to detect damage that dealt by an
unit, by order it to attack another unit, then take number of damage taken by this another unit.