There is state of unit that allows it to be untargetable, it works for all however. You could try to create a trigger that shots when player is selecting a unit, checking what player is that and unselecting it for him, the only flaw is that unit is visible for fraction of second anyways.
you could cloak it if the alliance setting fits, but also "send actor msg per player" (can be found somewhere here on this site) to hide the unit actor for one player + make it really small.
you could have 2 sets of abilities, one where one attribute is not allowed (there are more than target filters which can be used to filter targets) but that looks like the worst solution.
i don't think there is any data solution because it always applies for the unit and all players, but maybe i miss something.
i forgot to ask, is player 5 a hero with limited range? you could make the unit untargetable with a buff and give player 5 units an aura which removes this buff.
Will try it out, thanks. Players 1-4 are allies and they are supposed to protect a certain unit so making it untargetable will prevent teamkilling. Player 5 is a hero that i supposed to singlehandedly kill that unit.
Search where? On this site or editor? :P Anyway I searched both and didn't get much.
Maybe another solution is to ignore all damage from allies? Any idea how to achieve this using data editor with a buff, to make ally's attacks towards this unit deal no damage?
I want to make a unit untargetable for players 1-4, but targetable for player 5. Preferably only with triggers. Is this possible?
There is state of unit that allows it to be untargetable, it works for all however. You could try to create a trigger that shots when player is selecting a unit, checking what player is that and unselecting it for him, the only flaw is that unit is visible for fraction of second anyways.
@ZenonMalinowski: Go
Any other "more elegant" solution? Like maybe is there some behaviour in the data editor that allows me to do this?
create 2 units and hide 1 for each team? maybe conjunction does the job or use triggers to handle it then.
@FunkyUserName: Go
Hmm that's a good idea actually. But how do you hide a unit from a player?
Or maybe is there a way to make a unit type untargetable by allies in the data editor ?
you could cloak it if the alliance setting fits, but also "send actor msg per player" (can be found somewhere here on this site) to hide the unit actor for one player + make it really small.
you could have 2 sets of abilities, one where one attribute is not allowed (there are more than target filters which can be used to filter targets) but that looks like the worst solution.
i don't think there is any data solution because it always applies for the unit and all players, but maybe i miss something.
i forgot to ask, is player 5 a hero with limited range? you could make the unit untargetable with a buff and give player 5 units an aura which removes this buff.
Something like these perhaps?
My projects : The Hammer of Dawn, Noir : Automata, Noir : Evolution, Noir : Ascension, Hammer of Dawn Revamp
Many awesome projects : Custom Campaign Initiative
Something for the community : A Small Letter of Thanks, SC2mapster Classic Skin - Alevice
@FunkyUserName: Go
Will try it out, thanks. Players 1-4 are allies and they are supposed to protect a certain unit so making it untargetable will prevent teamkilling. Player 5 is a hero that i supposed to singlehandedly kill that unit.
@EDHRIANO: Go
I think data might be the best way to go, thanks for help anyway
@FunkyUserName: Go
Hmm can't seem to hide an actor for a player. I tried Send Actor Message and SetVisible but it doesn't seem to work
search here for send actor msg per player
@FunkyUserName: Go
Search where? On this site or editor? :P Anyway I searched both and didn't get much.
Maybe another solution is to ignore all damage from allies? Any idea how to achieve this using data editor with a buff, to make ally's attacks towards this unit deal no damage?
@Chris97Ong: Go
Event : X unit is attacked
Condition : Damaging unit is player 1
Action :
- Make X unit unselectable.
- Make X unit invulnerable.
- Order damaging unit to stop (replace existing order)
- Wait XY Seconds
- Condition - Unit X is not in battle / Unit X is idle
- Action : Make X unit selectable
- Action : Make X unit vulnerable
My projects : The Hammer of Dawn, Noir : Automata, Noir : Evolution, Noir : Ascension, Hammer of Dawn Revamp
Many awesome projects : Custom Campaign Initiative
Something for the community : A Small Letter of Thanks, SC2mapster Classic Skin - Alevice