• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Sword Tecnique ability (pasive)

Status
Not open for further replies.
Level 1
Joined
Jul 26, 2005
Messages
5
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.
 
Level 10
Joined
Aug 8, 2004
Messages
562
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
 
Level 1
Joined
Jul 26, 2005
Messages
5
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
 
Level 13
Joined
Dec 29, 2004
Messages
597
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.
 
Status
Not open for further replies.
Top