• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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 28
Joined
Feb 18, 2014
Messages
3,576
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: 16
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