• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Detecting Attack Type (Pierce, Magic, ...) of Attacking Unit

Status
Not open for further replies.
Level 1
Joined
Aug 25, 2010
Messages
4
Hi,
I need help because I'd like to detect of which type an attack was, when a unit got attacked.
The idea behind this to make a kind of mirror shield which should first absorb the damage (done this with a mana shield because it's easy^^) and cast effects and spells depending on the attack type. e.g. if an archer would attack the caster with pierce dmg and with range the shield would cast e.g. a stormbolt on the archer (done by a dummy).
I'd prefer a GUI solution but JASS would do this, too. But I couldn't find a possibility to check the attack type.
Or is it only possible to check the attacktype BEFORE the attack? (well I couldn't find sth. like that, too)

Thx

(Sry I recognized that this forum would suite better for my problem and whatismore my thread in the we help zone can't be seen by others, couldn't find a rule why it doesn't appear and my problem is urgent)
 
Level 5
Joined
Jan 4, 2007
Messages
103
Hm...maybe you could do this, go to Conditions, Boolean, Unit Clasification Check, go to A Unit is a Melee or Ranged. You can use Melee as, for an example, Normal attack and use, for Ranged, for an example, Piercing Attack. For hero attack use a Unit is a Hero. For Spell attacks ect. you can use unit is Undead ect. but make sure those units are Melee, Ranged, Undead if you want them to work. Hope it helps:)
 
Level 11
Joined
Sep 12, 2008
Messages
657
well point value is best solution.

example:

if point value of unit equal to 1

then unit create 1 dummy, issue last created unit to human mountain king - storm bolt target unit of ability behing cast.

else

if point value equal to 2,and so on.
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
Found the best solution each unit with pierce type attack or what ever the attack is add him an ability " unholy aura " remove the buff and everything even make the icon to NONE, then after that call it pierce which ever the unit attack you gonna give it to :)

A unit attack another unit .... if unit have the ability Pierce then do action :)
That's how it should work the best :)
Even adding an hidin ability like +1 armor, reducing bonus to 0, and call it Piercing can handle this job.

Thnx for the idea, i made it more upgraded but still it's your idea so +REP :D
 
Status
Not open for further replies.
Top