• 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.

Counter Strike Ability

Status
Not open for further replies.
Level 9
Joined
Dec 4, 2007
Messages
562
Anybody know how to create the Counter Strike ability that is like this "Counter Strike-Gives you a 10/15/20/25/30% chance to attack enemy unit that hits you "



Thanks :D

___________________________________________________________________
Sabelion
 
Level 12
Joined
Mar 23, 2008
Messages
942
Doing it...
I will edit when I finish it.

Edit: This is a very basic thing, you need to adapt to what you need:

Create a ability based in hardened skin called Counter-Attack, set all the bonus to 0 (Damage reduction, chance of reducing damage and whatever) and give it to your unit.

  • CounterAttack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Counter-Attack for (Attacked unit)) Greater than 0
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Random integer number between 0 and 100) Less than or equal to ((Level of Counter-Attack for (Attacked unit)) x 10)
    • Then - Actions
      • Unit - Cause (Attacked unit) to damage (Attacking unit), dealing (how much you want) damage of attack type (Chose Attack Type) and damage type (Chose Damage Type)
    • Else - Actions
      • Do nothing
In (how much you want) you can also do something like ((Level of Counter-Attack for (Attacked unit) * 5)) So if your unit have lv 3 in counter-attack he will deal 15 damage in counter attack.
You can also create a nice effect or set the unit to play a animation.

To change the % to do counter-attack, change that: (Random integer number between 0 and 100) Less than or equal to ((Level of Counter-Attack for (Attacked unit)) x 10)
In that example, if the unit have lv 3 in counter-attack he will have 30% chance of counter-attacking.

Have fun ^^
 
Level 9
Joined
Dec 4, 2007
Messages
562
Thanks very much you was quick :D +rep

Wait a sec... How do I do so that it doesnt cast counterstrike all the time? How do I do so that rank 2 will give 20% and rank 1 will give 15% for example?
 
Last edited by a moderator:
Level 9
Joined
Dec 4, 2007
Messages
562
And by the way... I cannot find this -Condition-"(Level of Counter-Attack for (Attacked unit)) Greater than 0"

Woash you are quick!

Can you help me abit? Im a noob in triggers. My msn is [email protected] if you got msn
 
Last edited by a moderator:
Level 3
Joined
Apr 19, 2008
Messages
36
lots of spaces? or something lol but btw just aimed at the original starter of this thread, the counter attack spell is a good idea :p i have trouble coming up with ideas :(
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
You're <lots of spaces> rit

I didnt tell because ralle can find out and disable that availability
 
Status
Not open for further replies.
Top