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

Targetability

Status
Not open for further replies.
Level 2
Joined
Mar 25, 2009
Messages
13
I am trying to make a somewhat complicated ability. In short, it would prevent anyone further than distance X from the unit from targeting the unit (clicking on/selecting). The unit would still be fully visible.

My first thought was to modify permanent cloaking so that it still effectively hid the unit but didn't graphically obscure it (cloaked units right now just look like ripples). Then, I would use script to share vision of the unit with anyone within distance X. Unfortunately, I can't quite figure out how to do this. Permanent cloaking seems to be a behavior, but I am not sure which field I would edit to make the unit less translucent. Additionally, Dark Templars are permanently cloaked and don't have the permanent cloaking behavior (they have flags which accomplish the same effects, but I'm not sure how they uncloak unless there's a way to change flags I'm not aware of).

I've also considered simply allowing the relevant unit to cloak graphically and sharing vision with anyone within distance X and then using an identical unselectable unit that would mimic the cloaked unit's animations and model (basically, I would draw over the cloaked unit to make it look like it wasn't cloaked), but this seems like an atrociously inefficient way to go about it.

Any input would be greatly appreciated. I'm hoping that I'm missing something really obvious.

TLDR: I am relatively new to the editor and am looking for a way to let a unit have the gameplay effects of being cloaked (untargetable, unattackable, unselectable) without it disappearing graphically.
 
Level 3
Joined
Apr 28, 2010
Messages
48
Ok, so you want to basically beable to attack a cloaked unit, while it appears visually cloaked?

I may not have the right answer, but,

I just looked and flags for abilities, you can make a unit translucent through abilities.

Or, if you're saying you want the effects of being "untargetable, unattackable, unselectable" that would be done in data/units/unit/flags/ where you can set these things on or off for a unit.
 
Level 2
Joined
Mar 25, 2009
Messages
13
Ok, so you want to basically beable to attack a cloaked unit, while it appears visually cloaked?
That's exactly the opposite of what I want (don't get me wrong though, I appreciate the help).

The flags you suggested give the desired effect, but what I'm looking for is a way to allow only certain players to select/attack/target a unit. I'll look into it more, but I don't know of a way to make flags work differently for different players.

Also, shameless bump because I'm still stuck.
 
Status
Not open for further replies.
Top