Include a checkable variation of maprevealer

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Include a checkable variation of maprevealer

Re: Include a checkable variation of maprevealer

by Fused » Sun Dec 04, 2016 6:58 am

Oh cool, glad this wasn't forgotten.

Re: Include a checkable variation of maprevealer

by Graf Zahl » Sun Dec 04, 2016 4:47 am

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

by Fused » Fri Jan 01, 2016 4:18 pm

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

Re: Include a checkable variation of maprevealer

by NeuralStunner » Fri Jan 01, 2016 4:03 pm

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

by Fused » Fri Jan 01, 2016 3:28 pm

welp.

I suppose it isn't possible to refer it to a different item that does that script, and keep maprevealer with the player?

Re: Include a checkable variation of maprevealer

by Graf Zahl » Fri Jan 01, 2016 3:16 pm

Easier said than done. Look what it does:

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;
}
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.

Include a checkable variation of maprevealer

by Fused » Fri Jan 01, 2016 2:41 pm

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.

Top