Non-inherent version of Forbidden/Restricted/Visibleto

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

Moderator: GZDoom Developers

Non-inherent version of Forbidden/Restricted/Visibleto

Postby Major Cooke » Mon Jul 23, 2018 11:17 am

It would be nice if there's a version of ForbiddenTo/RestrictedTo/VisibleToPlayerClass which acts as a black/white list and does not check inheritance. Strictly only those directly listed are affected by the properties.

Right now I'm trying to optimize some of D4D's demon runes while adding a new feature. There is an upgrade that allows picking up the runes of the same class type to extend the duration and heal the morphed player. Runes that are applicable have this ring.

An image to demonstrate. Currently I'm morphed as an arachnotron, so the rune on the left I can pick up. The rune to the right is a mancubus rune - it's not compatible so the ring turns invisible.

But in order to make this multiplayer friendly, I need a non-parent checking version of ForbiddenTo/RestrictedTo. Otherwise I would have to resort to using nasty hacks like the PowerSpeed trail... Not a good thing.
Last edited by Major Cooke on Mon Jul 23, 2018 12:05 pm, edited 2 times in total.
User avatar
Major Cooke
The road to Hell is paved in the carrion she leaves behind.
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Non-inherent version of ForbiddenTo/RestrictedTo

Postby Gez » Mon Jul 23, 2018 11:20 am

Can't you just override TryPickup?
Gez
 
 
 
Joined: 06 Jul 2007

Re: Non-inherent version of Forbidden/Restricted/VisibleTo

Postby Major Cooke » Mon Jul 23, 2018 11:55 am

It's not the pickup itself I need it for. It's the ring, the visual indicator of being compatible.

Not to mention the player can't actually pick up the items to begin with thanks to -PICKUP. I use a different method.

EDIT: Forgot to mention VisibleToPlayerClass too.
User avatar
Major Cooke
The road to Hell is paved in the carrion she leaves behind.
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests