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

Attacking Invulnerable Units

Status
Not open for further replies.
Make it so the unit that you want attacking the invulnerable unit is able to target it under "Combat - Attack(1 or 2) - Targets Allow". You will then need to use a trigger to initialize this damage.
  • Direct Damage Test
    • Events
      • Unit - Peasant 0002 <gen> Takes damage
    • Conditions
    • Actions
      • Unit - Set life of Peasant 0002 <gen> to ((Life of Peasant 0002 <gen>) - (Random real number between 5.00 and 6.00))
I tested and it works.

Test map below.

Edit: You will have to initialize the trigger event to each unit that you want it effected to though.
 

Attachments

  • invulnebility test.w3m
    16.1 KB · Views: 53
EDIT :
Another question, how do I stop a unit from auto attacking (attacking when a enemy comes close to him). I want to make my unit to attack when I want (triggered)


Object Editor -> Units -> Combat - Acquire (id: uacq)
Change to field's value 1. Standard is 500.

For ranged units, this will mean 1 attack range also. He is requesting for what I understood, to have enemies attack back ONLY if he attacked them first. So how about simply make all units to be owned by netural passive, and change ownership once they are attacks? this way, all ranged attackers will not be forced to attack at low range as their attack range was nerfed?
 
Status
Not open for further replies.
Top