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.
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.