"Paper Thin" Animated Doors?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
- zrrion the insect
- Posts: 2411
- Joined: Thu Jun 25, 2009 1:58 pm
- Location: Time Station 1: Moon of Glendale
"Paper Thin" Animated Doors?
I am wanting to make paper thin (single linedef) animated doors but as they require a sector to work the best I have been able to come up with is a very thin sector, but this is not exactly ideal.
Is there a way to make a thin animated door? If not is there a way to approximate the effect of an animated door?
Is there a way to make a thin animated door? If not is there a way to approximate the effect of an animated door?
- ramon.dexter
- Posts: 1529
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: "Paper Thin" Animated Doors?
The trick is put the texture inte the middle part of texture and use flags for blocking (usually, I use combo of "impassable" + "block everything"). When you put the texture into the middle section, it also allows you to make polyobject doors with only one or two linedefs.
- DenisBelmondo
- Posts: 379
- Joined: Fri Jun 06, 2008 6:26 pm
- Location: Two-Key Return
- Contact:
Re: "Paper Thin" Animated Doors?
I made a prototype of a Wolfenstein 3D styled door that may or may not be of some use. Here's the source. I haven't actually touched it in a while and it's uncommented but it's basically one linedef controlled through ACS whose texture is composed of a door patch and an empty space to the right of this patch that is equal to the width of it (so if it's a 64x64 patch, the texture entry will be 128x64) so that the texture doesn't wrap when its horizontal offset is being incremented. It's completely functional but sound bleeds through it when closed due to the very unfortunate state of affairs with regards to Doom's rigid sound bleeding system.
I suppose ramon.dexter's solution is probably your best bet. I also wonder if you can implement my method but with an invisible polyobject that "encapsulates" this linedef (a better way to put it would be to say it superimposes itself on it) and when one side of the polyobject is activated, you can script it so the linedef animates (or scrolls woefully at 35 Hz like in my example mod) and the polyobject teleports conveniently out of the way somewhere so that sound blocking and collision doesn't happen. It sounds like a semi-intensive hack but that'll probably solve the sound bleeding problem.
EDIT: wait actually polyobjects can't block sound iirc?
I suppose ramon.dexter's solution is probably your best bet. I also wonder if you can implement my method but with an invisible polyobject that "encapsulates" this linedef (a better way to put it would be to say it superimposes itself on it) and when one side of the polyobject is activated, you can script it so the linedef animates (or scrolls woefully at 35 Hz like in my example mod) and the polyobject teleports conveniently out of the way somewhere so that sound blocking and collision doesn't happen. It sounds like a semi-intensive hack but that'll probably solve the sound bleeding problem.
EDIT: wait actually polyobjects can't block sound iirc?
- zrrion the insect
- Posts: 2411
- Joined: Thu Jun 25, 2009 1:58 pm
- Location: Time Station 1: Moon of Glendale
Re: "Paper Thin" Animated Doors?
His solution is what I'm working with now, but blocking sound has been an issue with that approach.
- DenisBelmondo
- Posts: 379
- Joined: Fri Jun 06, 2008 6:26 pm
- Location: Two-Key Return
- Contact:
Re: "Paper Thin" Animated Doors?
It seems like the last time I tried something like this, BLOCKF_SOUND wasn't implemented as a flag in Line_SetBlocking... or something. I made some minor adjustments to my previous WAD but I don't think I need to upload it. Basically, set up your linedefs and sectors so it looks something like this:
The green linedef in the middle is tied to an ACS script that handles all the opening/closing/animating behavior. Then, with these linedefs:
Give them whatever tag you want, then do a in ACS (you need the latest version of ACC for this particular flag I think but you can just put in 1024 if it complains for whatever reason). Then, you should then block the sound again during the closing behavior, which is as easy as:
The green linedef in the middle is tied to an ACS script that handles all the opening/closing/animating behavior. Then, with these linedefs:
Give them whatever tag you want, then do a
Code: Select all
Line_SetBlocking(<YOUR TAG>, 0, BLOCKF_SOUND);
Code: Select all
Line_SetBlocking(<YOUR TAG>, BLOCKF_SOUND, 0);
Re: "Paper Thin" Animated Doors?
I'm not sure if I got what you need, but I make line doors for my mods simple with SetLineBlocking and SetLineTexture. You can block players, monsters, sounds, attacks and quite everything w it. You can also make fake rotating doors, just like that bathroom door from "Cold as Hell" 1th map.
Also, messing with middle texture's offsets you can make even fake "doom doors" in doom.
Also, messing with middle texture's offsets you can make even fake "doom doors" in doom.
- Arctangent
- Posts: 1235
- Joined: Thu Nov 06, 2014 1:53 pm
- Contact:
Re: "Paper Thin" Animated Doors?
I doubt you actually can, considering lines can only "half block" sounds so a single line won't stop sound propagation - two are necessary for that.Ravick wrote:I'm not sure if I got what you need, but I make line doors for my mods simple with SetLineBlocking and SetLineTexture. You can block players, monsters, sounds, attacks and quite everything w it.
Re: "Paper Thin" Animated Doors?
I was doing it right even before I kown it was necessary, haha
A door usually is not just a line between 2 walls, but a line inside some sector(s) build to make it looks better (just like having a lower ceiling or so). I usually set all those lines or just a few of them to block sound. The only one that changes this parameter was the line-door itself, as SetLineBlocking removes it when player open it, and ten it used to work even I not knowing it was required to have 2 lines for that.
A door usually is not just a line between 2 walls, but a line inside some sector(s) build to make it looks better (just like having a lower ceiling or so). I usually set all those lines or just a few of them to block sound. The only one that changes this parameter was the line-door itself, as SetLineBlocking removes it when player open it, and ten it used to work even I not knowing it was required to have 2 lines for that.
- zrrion the insect
- Posts: 2411
- Joined: Thu Jun 25, 2009 1:58 pm
- Location: Time Station 1: Moon of Glendale
Re: "Paper Thin" Animated Doors?
I have ended up using a solution utilizing setlineblocking and setlinetexture actually, and the only issue I have with it is that it will "close" on the player and they will be stuck.
Re: "Paper Thin" Animated Doors?
check if player is on the line, it should be possible but I couldn't find a way to do this yet, to make it easier you could create a sector arround the door and check if any actor is on it with this
Last edited by Zen3001 on Wed Jan 17, 2018 3:08 pm, edited 1 time in total.
- zrrion the insect
- Posts: 2411
- Joined: Thu Jun 25, 2009 1:58 pm
- Location: Time Station 1: Moon of Glendale
Re: "Paper Thin" Animated Doors?
That might work. I will toy around with it, but it at least sounds like something that could work.