Warcraft III resources & community, 2003–2006 · archived

Sword Tecnique ability (pasive)

8 posts
#1

Sword Tecnique ability (pasive)

i need some help making a passive ability because i can't figure it up. The ability needs to be used when the hero that has it attacks a unit at the same moment that unit attacks him like crossing blades, making that unit misses his attack and the hero get's a percentaje of his attack as a bonus damage.
Plz if u' boys have any idea for making this passive ability help me.
#2
i will try to make it then post the triggers for you, ust give me an hour or so.
#3
BY GOD! I'VE DONE IT!
that was waaaaaaaay easier then expected
HERE IT IS:
**REQUIERS 3 TRIGGERS**
1- Event-unit learns skill
Condition-skill lerned equal to YourSkill
Action-Set Triggering unit = MyVariableA

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
#4

Thanks a LOT

thanks a lot iplaystarcraft, i didn't think that way for making that ability i really like your work!!
unlimited thanks for you!! :D
#5
iplaystarcraft
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
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.
#6
they dont have the same conditions... :?

one has a condition that is- Attacking unit and oe that has-attacked unit
duh...
#7
However, the fact that they are both used at the same event still stands.

This means that trigger 3 could run before trigger 2... The same point.
#8
oh well who cares it works fine. leave it!