Getting sound for a sliding door.
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.
-
- Posts: 340
- Joined: Wed Jan 24, 2007 8:54 pm
Getting sound for a sliding door.
Im experimenting with polyobjdoorslide. I got it to work perfectly but it has no sound, in a couple tutorials I saw for this type of door it had a neat special sliding door sound, but no explanation on how to get the sound to work. All tutorials Ive looked at on this type of door leave out the sound part. Does anyone have experience with this?
Im using UDMF format and doombuilder 2 BTW
Im using UDMF format and doombuilder 2 BTW
Re: Getting sound for a sliding door.
This is what you need: it took me a while to figure out as well.
I'm sure someone a bit more familiar with ZDoom's nuances can explain it(THAT'S YOUR CUE KAPPES!), but hopefully this should help a bit.

- Kappes Buur
-
- Posts: 4180
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: Getting sound for a sliding door.
0bsidian wrote:... (THAT'S YOUR CUE KAPPES!), ......

SNDSEQ is correct, but some more info is required, for example:
Take a sound, for example doormove.ogg
Associate the sound in SNDINFO with the sound sequence from SNDSEQ,
Code: Select all
PolyMove doormove
Code: Select all
:PolyOpen
door 20
playrepeat PolyMove
end
giving it the sound sequence number from SNDSEQ, in this case 20.
-
- Posts: 340
- Joined: Wed Jan 24, 2007 8:54 pm
Re: Getting sound for a sliding door.
Ok questions since I'm still learning.
For informational purposes the exact sound Im looking for is this one...
http://zdoom.org/zdkb/zdoom1.html It's demonstrated in the testdoor.wad and is perfect for this type of door.
Probably already knew that so here's what I need to know...
I dont remember this sound in Doom or Doom2, so which wad will I have to pull resources from to obtain it? Will it work in UDMF format, the test wad was in hexen format so I assume the sound came from Hexen.
The code your showing is still pretty new to me, I did my first script in 4 years last night so I might need explained exactly what to put in the script editor. You have two different codes, do I put them both in the editor as you have them? I'll brush up on the link provided until I at least start making some noise with scripts, if Im sounding to newbie
For informational purposes the exact sound Im looking for is this one...
http://zdoom.org/zdkb/zdoom1.html It's demonstrated in the testdoor.wad and is perfect for this type of door.
Probably already knew that so here's what I need to know...
I dont remember this sound in Doom or Doom2, so which wad will I have to pull resources from to obtain it? Will it work in UDMF format, the test wad was in hexen format so I assume the sound came from Hexen.
The code your showing is still pretty new to me, I did my first script in 4 years last night so I might need explained exactly what to put in the script editor. You have two different codes, do I put them both in the editor as you have them? I'll brush up on the link provided until I at least start making some noise with scripts, if Im sounding to newbie

-
- Posts: 340
- Joined: Wed Jan 24, 2007 8:54 pm
Re: Getting sound for a sliding door.
Also if there is a wad demonstrating how sound scripts work, Im a fairly visual learner, and it would help. If I can see in a wad how a sound was associated with a script id learn it fast.
- Kappes Buur
-
- Posts: 4180
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: Getting sound for a sliding door.
Mapping for the Hexen format simply means that the editor will use the advanced features popularized
by Hexen and later adopted by ZDoom. Hence G/ZDOOM (Doom in Hexen format). See http://zdoom.org/wiki/Map_format
Ok, now about the sound(s) for a PolyObject:
Staying with Richard Clark's zdoom1.html. As you read this have the testdoor.wad file open in Slade3.
First of all you need to have the sound files.

DOORSTR - to start the movement of the PolyObject
DOORMID - while the PolyObject is in transit
DOOREND - and the movement stops
While those sounds are in the Doom format, they could be in any sound format which is supported by ZDoom. Ogg is a good choice.
Next SNDINFO:
As you can see, the sounds are now associated with an event name.
Next SNDSEQ, the events are associated with specific actions
playuntildone and playrepeat could be used interchangeably for a door. Try it out for yourself.
SNDINFO and SNDSEQ are simply text files, no need for compilation as is required by scripts.
Ok, so far we have dealt with getting the sound sequence done, but how is the sound attached to the
PolyObject? Well, that is done when the PolyObject is constructed, with the PolyObj_StartLine special:

To show how this applies to a different sound, I added a second poly_Door with a different sound and index.
http://www.mediafire.com/download/gq821 ... tdoor2.wad
To bring the sounds and SNDINFO and SNDSEQ into your own map, simply copy/paste them with Slade3.
To convert a map from Doom in Hexen format to Doom UDMF(ormat) check out this.
by Hexen and later adopted by ZDoom. Hence G/ZDOOM (Doom in Hexen format). See http://zdoom.org/wiki/Map_format
Ok, now about the sound(s) for a PolyObject:
Staying with Richard Clark's zdoom1.html. As you read this have the testdoor.wad file open in Slade3.
First of all you need to have the sound files.

DOORSTR - to start the movement of the PolyObject
DOORMID - while the PolyObject is in transit
DOOREND - and the movement stops
While those sounds are in the Doom format, they could be in any sound format which is supported by ZDoom. Ogg is a good choice.
Next SNDINFO:
Code: Select all
door1_start doorstr // to start the movement of the PolyObject
door1_mid doormid // while the PolyObject is in transit
door1_end doorend // and the movement stops
Next SNDSEQ, the events are associated with specific actions
Code: Select all
:Door1 // just a name for this sequence, don't forget the colon (:)
door 0 // the sequence is applied to a door with the index 0
playuntildone door1_start
playrepeat door1_mid
stopsound door1_end
end
SNDINFO and SNDSEQ are simply text files, no need for compilation as is required by scripts.
Ok, so far we have dealt with getting the sound sequence done, but how is the sound attached to the
PolyObject? Well, that is done when the PolyObject is constructed, with the PolyObj_StartLine special:

To show how this applies to a different sound, I added a second poly_Door with a different sound and index.
http://www.mediafire.com/download/gq821 ... tdoor2.wad
To bring the sounds and SNDINFO and SNDSEQ into your own map, simply copy/paste them with Slade3.
To convert a map from Doom in Hexen format to Doom UDMF(ormat) check out this.
-
- Posts: 340
- Joined: Wed Jan 24, 2007 8:54 pm
Re: Getting sound for a sliding door.
Thanks, it's starting to make some sense now, I downloaded slade and looked at some wads and copied some things over to my map, once I have more time to fool with it I think I'll get it, I'll let you guys know.
I was very confused, I didn't realize that SNDSEQ and SOUNDIFO aren't script commands, or text files outside the Wad, they're are actually files within a Wad. Looking at the test wads with doombuilder 2 wasn't helping, I was using the wrong program.
I was very confused, I didn't realize that SNDSEQ and SOUNDIFO aren't script commands, or text files outside the Wad, they're are actually files within a Wad. Looking at the test wads with doombuilder 2 wasn't helping, I was using the wrong program.

-
- Posts: 340
- Joined: Wed Jan 24, 2007 8:54 pm
Re: Getting sound for a sliding door.
Thanks for the help, I got it working. To let you guys know what Im using this for. I'm currently making a level that will display all the various effects that can be done with Zdoom. It will probably include 100 rooms or more all with different effects. I'll use this as a template to create playable levels in the future. I'll have a nice little reference to go to if I need to know how to do anything. So far I've messed with various types of doors, a submergeable sector, I've played with teleporting a great deal. My next room will be strictly sound effects, It'll be a room with a few dozen switches and platforms which demonstrate how to get various sound effects to work. I'll probably end up importing all the sounds and textures from final doom, doom 2, and maybe hexen, so I have as many resources as I need to create effects.
Not sure if anyone would be interested in having this, it'd be helpful for beginners. At the very least I'm learning how to do everything for future reference.
Not sure if anyone would be interested in having this, it'd be helpful for beginners. At the very least I'm learning how to do everything for future reference.

-
- Posts: 340
- Joined: Wed Jan 24, 2007 8:54 pm
Re: Getting sound for a sliding door.
How about making a polyobj door only open with a keycard? How do I do that?
- Kappes Buur
-
- Posts: 4180
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: Getting sound for a sliding door.
You would have to use a combination of LOCKDEFS and ACS scripting to check the inventory.
Also, if you want to use, for example a purple keycard, a bit of DECORATE and, of course,
new sprites for the keycard and inventory.
Also, if you want to use, for example a purple keycard, a bit of DECORATE and, of course,
new sprites for the keycard and inventory.
-
- Posts: 340
- Joined: Wed Jan 24, 2007 8:54 pm
Re: Getting sound for a sliding door.
I hate to ask but could anyone give me an example of the script, I have the door functioning perfectly, I don't mind redoing some of it. Otherwise I'll just make the key raise a panel that has a button for the door. I suppose that would work easy without a script. Im going to put that area on hold for now, this new map Im working on will be massive, it should be a lot of fun I'll just need help with little things now and then.
- Kappes Buur
-
- Posts: 4180
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: Getting sound for a sliding door.
Hopefully these examples will be helpful:
An example with a new purple key card
http://www.mediafire.com/download/bjbq9 ... r_key2.wad
and an example with the normal red key card
http://www.mediafire.com/download/x1zcj ... eycard.wad
An example with a new purple key card
http://www.mediafire.com/download/bjbq9 ... r_key2.wad
Spoiler:
and an example with the normal red key card
http://www.mediafire.com/download/x1zcj ... eycard.wad
Spoiler:
-
- Posts: 340
- Joined: Wed Jan 24, 2007 8:54 pm
Re: Getting sound for a sliding door.
Thanks for the help, that worked perfectly! I modified the script some, but it gave me a good starting point and I learned some more script terms.