Dear ZDoomers,
out of curiosity, if I create a SNDSEQ for a swinging door, how does it actually behave? Which sound is played when? Or actually can I give different sounds to the situation when the door "opens" and when it "closes" (so to be more precise "open" when I first use the polydoor and "closes" when it's closing animation ends)
[Solved] Sound behaviour of swinging doors?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- Tormentor667
- Posts: 13554
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
[Solved] Sound behaviour of swinging doors?
Last edited by Tormentor667 on Sun Mar 12, 2017 12:43 pm, edited 1 time in total.
Re: Sound behaviour of swinging doors?
I don't know if things have been improved since this, but the method described here has worked for me.
viewtopic.php?t=11388

viewtopic.php?t=11388

- Tormentor667
- Posts: 13554
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: Sound behaviour of swinging doors?
Thanks Enjay,
If that's the code I am having trouble with understanding the last part... :-/
Code: Select all
:HereticDoorOpen
play doors/dr1_open
nostopcutoff
end
:HereticDoorClose
play doors/dr1_open
stopsound doors/dr1_clos
end
[HereticDoor
0 HereticDoorOpen
1 HereticDoorClose
2 HereticDoorOpen
3 HereticDoorClose
]
Re: Sound behaviour of swinging doors?
Here's what I used in my Before The Storm mod:
See how I've added DOOR 32 to my definition? Putting 32 on to the line in the editor as the sound sequence parameter did the trick IIRC. I *think* what ZDoom does internally is if the poly is moving quickly, it picks the fast sounds and it also distinguishes between whether it is opening or closing. At least that's how I remember it. So, again from memory, the one sequence can be set to pick a fast or slow sound and an open or close sound depending on how the poly is moving... I think.
[edit] and more...
From zdoom.pk3
From that it looks as if things should be set up so that the normal/slow sounds should be sequences 0 and 1 and the fast sounds 2 and 3. If you want only one type of sound (speed-wise) then you duplicate things so that 0 and 1 read the same as 2 and 3.
[edit2]
Aaaand, there's a bit of detail towards the bottom of the wiki [wiki]SNDSEQ[/wiki] page on this too.
Code: Select all
//////////////////////////////////////////////////////////////
//door opening sound for polyobjects (fast door open sound)
:PolyOpenFast
play PolyOpenFast
nostopcutoff
end
//door closing sound for polyobjects (fast door open sound)
:PolyCloseFast
play PolyCloseFast
nostopcutoff
end
[PolyFastNJ
DOOR 32
0 PolyOpenFast
1 PolyCloseFast
2 PolyOpenFast
3 PolyCloseFast
]
//////////////////////////////////////////////////////////////
[edit] and more...
From zdoom.pk3
Code: Select all
// Doom Doors ---------------------------------
:DoorOpenNormal
play doors/dr1_open
nostopcutoff
end
:DoorCloseNormal
play doors/dr1_clos
nostopcutoff
end
:DoorOpenBlazing
play doors/dr2_open
nostopcutoff
end
:DoorCloseBlazing
play doors/dr2_clos
nostopcutoff
end
[DoorNormal
0 DoorOpenNormal
1 DoorCloseNormal
2 DoorOpenBlazing
3 DoorCloseBlazing
]
[edit2]
Aaaand, there's a bit of detail towards the bottom of the wiki [wiki]SNDSEQ[/wiki] page on this too.
- Tormentor667
- Posts: 13554
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: Sound behaviour of swinging doors?
Thanks alot Nigel
With this information I was able to solve the problem.

Re: Sound behaviour of swinging doors?
Too bad, one '8' too many to make the Lucas ref really relevant.Enjay wrote:viewtopic.php?t=11388
Re: [Solved] Sound behaviour of swinging doors?
I didn't even spot that. Good eye.