• 🏆 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!

Purge may cause damage ?

Level 5
Joined
May 8, 2020
Messages
78
1709802612762.png

Removes all buffs from a target unit. Enemy units are also immobilized for 2 seconds and their movement speed is reduced by a factor of 3; they will slowly regain their movement speed over 4 seconds. Deals 400 damage to summoned units.


I want How to create this skill that can deal damage equal to 5 x the intelligence of the target possessing it, destroy clone, I also want it to be able to destroy 3 to 4 clones or within a radius
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,576
Attribute based bonus damage:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to YourAbility
  • Actions
    • Set Variable TempReal = ((Real ((Intelligence of (Triggering Unit) (Include Bonuses)))) x 5.00)
    • Unit - Cause (Triggering Unit) to damage (Target unit of ability being cast), dealing TempReal damage of attack type Spells and damage type Normal
Since damage is a Real but attributes are Integers you need to convert the attribute to a Real.

If you want to instantly destroy clones, which I assume are illusions, then you can do the usual setup for dealing with groups of units. I'm sure you've done this before, basically anytime more than one unit is involved you're likely going to be using a Unit Group variable and the Pick Every Unit action:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to YourAbility
  • Actions
    • Set Variable TempReal = ((Real ((Intelligence of (Triggering Unit) (Include Bonuses)))) x 5.00)
    • Set Variable TempPoint = (Position of (Target unit of ability being cast))
    • Set Variable TempGroup = (Units within 300.00 range of TempPoint)
    • Unit - Cause (Triggering Unit) to damage (Target unit of ability being cast), dealing TempReal damage of attack type Spells and damage type Normal
    • Unit Group - Pick every unit in TempGroup and do (Actions)
      • Loop - Actions
        • Set Variable TempTarget = (Picked unit)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (TempTarget belongs to an enemy of (Owner of (Triggering unit).) Equal to True
            • (TempTarget is alive) Equal to True
            • (TempTarget is an illusion) Equal to True
          • Then - Actions
            • Unit - Kill TempTarget
          • Else - Actions
    • Custom script: call RemoveLocation( udg_TempPoint )
    • Custom script: call DestroyGroup( udg_TempGroup )
Try to get used to this pattern, you will use it A LOT.
 
Last edited:
Top