1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Targetting only units with resistant skin

Discussion in 'World Editor Help Zone' started by Spear, Apr 18, 2020.

  1. Spear

    Spear

    Joined:
    Jul 31, 2019
    Messages:
    103
    Resources:
    0
    Resources:
    0
    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.
     
  2. Warseeker

    Warseeker

    Joined:
    Feb 18, 2014
    Messages:
    3,078
    Resources:
    2
    Maps:
    2
    Resources:
    2
    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.
     

    Attached Files:

  3. Spear

    Spear

    Joined:
    Jul 31, 2019
    Messages:
    103
    Resources:
    0
    Resources:
    0
    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)
     
  4. Lord Esdin

    Lord Esdin

    Joined:
    Nov 17, 2019
    Messages:
    249
    Resources:
    0
    Resources:
    0
    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.