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

Targetting only units with resistant skin

Status
Not open for further replies.
Level 5
Joined
Jul 31, 2019
Messages
102
I was trying to make a critical strike ability that only targets units who have resistant skin, is this possible? I know if you check heroes as a target it only targets heroes.
 
Level 30
Joined
Feb 18, 2014
Messages
3,623
Critical strike is hardcoded but you can trigger it.
  • Critical Strike Resistant
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to Paladin 0000 <gen>
    • Actions
      • Set RandomChance = (Random integer number between 1 and 100)
      • Game - Display to (All players) the text: (String(RandomChance))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomChance Less or Equal to 15
          • ((Attacked unit) is Resistant) Equal to TRUE
        • Then - Actions
          • Set Point = (Position of (Attacked unit))
          • Unit - Create 1 DUMMY for (Owner of (Attacking unit)) at Point facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Critical Strike (100%) to (Last created unit)
          • Unit - Order (Last created unit) to Attaquer (Attacked unit)
          • Custom script: call RemoveLocation (udg_Point)
        • Else - Actions
Although, it's better to use a Damage Detection System instead of A unit is attacked.
 

Attachments

  • Critical Strike Resistant.w3x
    18 KB · Views: 19
Level 5
Joined
Jul 31, 2019
Messages
102
It was not about critical strike. It was about whether it's possible to have abilities that target only resistant units (preferably w/o triggers)
 
Level 7
Joined
Nov 17, 2019
Messages
224
I have tried to make something similar before, there is no way to do it, what you can do is give the units the "suicidal" classification and check that off among the targets allowed for your ability. But be warned that units with that classification cannot board transports.
 
Status
Not open for further replies.
Top