Block walking monsters only line flag.

Moderator: GZDoom Developers

Post Reply
User avatar
Enjay
 
 
Posts: 26533
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Block walking monsters only line flag.

Post by Enjay »

There are lots of blocking (and other) line flags available in UDMF for GZDoom
Image
But there is one that has not been implemented which I would find very useful, more so than some of the ones that do exist. Specifically, I am referring to "block walking monsters" so that a line could be set up that allows floating monsters to cross but not walking ones. I have had situations where such a feature would have been very useful on several occasions but I don't think, for example, that I have ever needed the block floating monster flag (not saying it wouldn't have its uses, just that I have never needed it).

At present, mappers resort to tricks like making a very narrow invisible deep trench that is deeper than a walking monster's step height, or sometimes invisible mid textures set to act as walkable textures are used if also blocking the player is desirable, or abusing the CANTLEAVEFLOORPIC actor flag. In fact, it's one of the few things left in mapping that requires a "hack" rather than being done with proper built-in features.

So it would be nice to have this flag if it can be done.

Thank you for reading.
User avatar
Rachael
Posts: 13542
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Block walking monsters only line flag.

Post by Rachael »

I think this would be easy enough to add, I just need an "ok" to do it because it involves modifying the UDMF map reader.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Block walking monsters only line flag.

Post by Graf Zahl »

Why do you need an 'ok'? Of course adding new properties requires modifying the map reader so what's so special here?
User avatar
Rachael
Posts: 13542
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Block walking monsters only line flag.

Post by Rachael »

Changing the UDMF spec?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Block walking monsters only line flag.

Post by Graf Zahl »

Yeah, add a new entry to the spec, same as everybody who ever added something before had to do as well.
User avatar
Enjay
 
 
Posts: 26533
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Block walking monsters only line flag.

Post by Enjay »

Much as it pains me to bump this, I just came across another mapping situation where this would be useful to me - a bunch of flying robots who should be able to enter/leave a dangerous area by passing through a forcefield, but normal humans would not want to enter the dangerous area, so they don't cross the forcefield.

If anyone feels like tackling this, it would be much appreciated.

BTW, I have tried various combinations of setting blocking types (e.g. monsters) and then specifically unblocking floating monsters but that didn't work.
User avatar
Rachael
Posts: 13542
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Block walking monsters only line flag.

Post by Rachael »

Damn. I can't believe I forgot about this for a whole damn year. lol. And this is one of those things that can be done pretty easily in under an hour too.
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Block walking monsters only line flag.

Post by Gez »

Isn't this part of MBF21 and therefore [Already In]?
https://github.com/kraflab/mbf21/blob/m ... cs/spec.md

Code: Select all

Linedef Flags
Dec 	Bit 	Description
4096 	12 	Block land monsters
8192 	13 	Block players
User avatar
Enjay
 
 
Posts: 26533
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Block walking monsters only line flag.

Post by Enjay »

So it's already in?

OK, embarrassing question - how do I apply linedef flag numeric values directly to a line in UDB? I know how to do it in DeePsea, but I can't see anything obvious in UDB - only tick boxes and no numeric entry field. Do I have to add a custom field for the line or something? (In fact, I can't really find any meaningful end-user documentation for how to use MBF21.)
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Block walking monsters only line flag.

Post by Gez »

In udmf, flags have been turned into separate Boolean variables instead of being bunched into a single flag field. The new flag (since "block players" was already in for a long, long while) is called "blocklandmonsters". So yes, add a custom field, Boolean type, with that name. Though it probably should be added to the UDB config files to save people from having to use the custom tab.
https://github.com/coelckers/gzdoom/com ... 1519c43633
User avatar
Enjay
 
 
Posts: 26533
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Block walking monsters only line flag.

Post by Enjay »

Thanks for the help and explanation.

Image
Yes! it works perfectly. I do find it weird that it was something that was omitted from the original UDMF setup where flying monsters were explicitly blockable but walking ones were not, but it can be done now. :biggrin:

I agree that it would be more useful to be added to the UDB config files. The custom tab is useful, but cumbersome compared to a tick box. I'll open an issue/request on UDB's github for it. [edit] Done [/edit] [edit]and it's been added. Cheers Boris. :thumb: [/edit]

Just thinking ahead, I take it that there is not support for Line_SetBlocking... or maybe 4096 can be used (or a flag defined for it)? I'll have to check. [edit] No, that doesn't seem to work. [/edit]
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Block walking monsters only line flag.

Post by drfrag »

I've merged this but not the MBF21 stuff. It's preferable that someone (Enjay for instance) tries it.
https://github.com/drfrag666/gzdoom/commits/g3.3mgw

BTW in xlat/defines.i it says ML_BLOCKLANDMONSTERS and not ML2_BLOCKLANDMONSTERS i guess it doesn't matter.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Block walking monsters only line flag.

Post by Graf Zahl »

No, in this context it does not matter and the distinction isn't even desired.
User avatar
Enjay
 
 
Posts: 26533
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Block walking monsters only line flag.

Post by Enjay »

drfrag wrote:I've merged this but not the MBF21 stuff. It's preferable that someone (Enjay for instance) tries it.
Seems to work just fine. :thumb: The attached simple demo shows that lost souls and cacodemons (and the player) can move out and in to the central area whereas the imps and hell knights cannot. It works just fine in GZDoom and in the latest git build of LZDoom.
BlockLand.pk3
(5.06 KiB) Downloaded 47 times
The MAPINFO is primarily there to stop infighting because, without it, the enemies were so preoccupied with killing each other that they hardly bothered to leave the central area even if they could.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Block walking monsters only line flag.

Post by drfrag »

Graf Zahl wrote:No, in this context it does not matter and the distinction isn't even desired.
Okay then.
Enjay wrote:Seems to work just fine.
Fine thanks.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”