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

[General] Untargetable Unit

Status
Not open for further replies.
Level 5
Joined
Jan 18, 2012
Messages
179
Hello everyone, I was wondering how to make a Unit untargetable? Untargetable means, it can not be touched or attacked (for e.x. if you stop while near the hostile enemy the unit can not be hitted or if you press the A button you can't target the hostile unit neither if you press the left click and hold it enough to cover the unit), so how to make this? But make sure spells can target it, just normal attacks won't. If you need to make triggers for that then tell me first cause maybe I change idea, but if its possible without triggers could be cool, any ideas?
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
Hello everyone, I was wondering how to make a Unit untargetable? Untargetable means, it can not be touched or attacked (for e.x. if you stop while near the hostile enemy the unit can not be hitted or if you press the A button you can't target the hostile unit neither if you press the left click and hold it enough to cover the unit), so how to make this? But make sure spells can target it, just normal attacks won't. If you need to make triggers for that then tell me first cause maybe I change idea, but if its possible without triggers could be cool, any ideas?

Try making its Selection Scale in Object Editor to 0.01 - 0.99. The smaller the untargetable I guess....
 
Last edited:
Level 25
Joined
Sep 26, 2009
Messages
2,378
It won't work. Imo I don't think you can have unselectable unit the way you want it in WCIII

- while locust makes unit untargetable, it also makes the unit immune to damage (thus even spells)
- setting selection scale to 0,01 will prevent the unit to be selected when you click on it, but you will be able to still select it by left-clicking on the screen and dragging selection over that unit (just like when you select multiple units).
- Also while you will be unable to order your unit to directly attack this "unselectable" target/unit, if you order your unit to attack point nearby the target, that unit will attack the target
 
Level 4
Joined
Jan 27, 2010
Messages
133
Are you using damage type magic in your map? Otherwise you can Bannish the unit. Will make sure it cannot attack nor be attacked; except by spells.
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
100% Evasion is the best you're going to do, based on what you're looking for. You can also make the unit "flying" and ensure other units can only attack non-flying units. This only works if you have no real flyers in the game.

//\\oo//\\

Edit: I have a theory, currently testing it...

Edit2:

I'm going to assume you're not using suicidal units (E.G. Goblin Sappers) in your game.

Under Object Editor, set Combat - Targeted as to Suicidal
Then, for everything you don't want to be able to kill it, set Combat - Attack # Targets allowed to include Non-suicidal

Attached is a test map, which I think does what you asked for. It's a better solution than my previous flying/non-flying suggestion. Try to get the rifleman to friendly fire, it won't work. They also don't auto-acquire each other.
 

Attachments

  • Test_attacks.w3m
    16.9 KB · Views: 56
Status
Not open for further replies.
Top