Maprevealer is the native item of Allmap, which reveals the whole map, in case someone didn't know.
Currently maprevealer immediatley removes itself from the player's inventory when being picked up with any item that uses it in Doom.
This is probably intended in some way, but it is very weird as it's the only item used in power ups that will not stay with the player (for a while) when picked up, as far as I know.
This sucks because without modifying the inventory item using decorate, It will be unable to be used in SBARINFO.
Problem is that I am creating an alternative hud for online play in Zandronum, and I'm not able to do this as it's intended as an optional feature to put inside your skins folder.
My request is to include an item that is given together with the maprevealer item, so it can be used to check if the player has picked up the maprevealer on the level in your status bar.
Include a checkable variation of maprevealer
Moderator: GZDoom Developers
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49231
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Include a checkable variation of maprevealer
Easier said than done. Look what it does:
What you really need is some means to retrieve this level flag. But wait: The flag is global for all players, of course, so it's not as easy as it looks.
Code: Select all
//===========================================================================
//
// AMapRevealer :: TryPickup
//
// The MapRevealer doesn't actually go in your inventory. Instead, it sets
// a flag on the level.
//
//===========================================================================
bool AMapRevealer::TryPickup (AActor *&toucher)
{
level.flags2 |= LEVEL2_ALLMAP;
GoAwayAndDie ();
return true;
}
Re: Include a checkable variation of maprevealer
welp.
I suppose it isn't possible to refer it to a different item that does that script, and keep maprevealer with the player?
I suppose it isn't possible to refer it to a different item that does that script, and keep maprevealer with the player?
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Include a checkable variation of maprevealer
You can make a dummy powerup (say, [wiki]PowerProtection[/wiki] with a 1.0 DamageFactor) with infinite time (0x7FFFFFFF), and replace the map with a [wiki]CustomInventory[/wiki] that gives both your powerup and the map revealer. Then it's a matter of checking against the powerup.
Re: Include a checkable variation of maprevealer
Sadly I can't use any decorate-related things as Zandronum will simply deny the file from my skins folder since it could be used for cheating. I can only add things that won't enhance anything online so it will have to be done without editing maprevealer myself, but thanks for your suggestion.NeuralStunner wrote:You can make a dummy powerup (say, [wiki]PowerProtection[/wiki] with a 1.0 DamageFactor) with infinite time (0x7FFFFFFF), and replace the map with a [wiki]CustomInventory[/wiki] that gives both your powerup and the map revealer. Then it's a matter of checking against the powerup.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49231
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Include a checkable variation of maprevealer
Since the flag is now readable from ZScript, this can be closed. In order to make the automap per-player, a lot more changes would be needed.
Re: Include a checkable variation of maprevealer
Oh cool, glad this wasn't forgotten.