Make +NoTarget applicable to players

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Make +NoTarget applicable to players

Post by Ghastly »

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.
User avatar
Rachael
Posts: 13957
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Make +NoTarget applicable to players

Post by Rachael »

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);
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: Make +NoTarget applicable to players

Post by Ghastly »

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.
User avatar
Rachael
Posts: 13957
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Make +NoTarget applicable to players

Post by Rachael »

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

Return to “Feature Suggestions [GZDoom]”