Make +NoTarget applicable to players
Moderator: GZDoom Developers
Make +NoTarget applicable to players
Currently we have no way of making it so a player can't be seen by monsters (if we wanted to make something like Quake 1's Ring of Shadows powerup for example). The closest thing is +Invisible, but that also applies RenderStyle None and has some very odd behavior besides. I checked, and both the NoTarget and NeverTarget flags have no effect when used on players.
Re: Make +NoTarget applicable to players
You can do SetPlayerProperty from ACS, DECORATE, and ZScript, to do this. I am not 100% positive that it's wise to change the behavior of this property if it's been used in a different way in already existing mods, since it's been this way for years.
https://zdoom.org/wiki/SetPlayerProperty
SetPlayerProperty(0, 1, PROP_NOTARGET);
https://zdoom.org/wiki/SetPlayerProperty
SetPlayerProperty(0, 1, PROP_NOTARGET);
Re: Make +NoTarget applicable to players
Just tried it, and yeah that does work for a lot of cases (toggling a flag is the same as toggling a property, for PowerupGivers), but I can see a flag being a bit more useful for morph classes. For example, a Hexen powerup that turns you into a squirrel that monsters don't notice.
Little embarrassed that I didn't even know about that player property, but I feel better that nobody else I asked knew about it either.
Little embarrassed that I didn't even know about that player property, but I feel better that nobody else I asked knew about it either.
Re: Make +NoTarget applicable to players
I'm going to wait to see what Graf thinks before I change this - I have no issue with making +NOTARGET making the player unattackable and I doubt it will affect mod compatibility much, but Graf should have the final say on that, just to be sure.