Getting sound for a sliding door.

Archive of the old editing forum
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.
Locked
mikenet2007
Posts: 340
Joined: Wed Jan 24, 2007 8:54 pm

Getting sound for a sliding door.

Post by mikenet2007 »

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
User avatar
0bsidian
Posts: 1118
Joined: Sun Oct 28, 2012 11:59 pm
Location: New Zealand

Re: Getting sound for a sliding door.

Post by 0bsidian »

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

Post by Kappes Buur »

0bsidian wrote:... (THAT'S YOUR CUE KAPPES!), ......
:D

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
in SNDSEQ specify how and when to use it

Code: Select all

:PolyOpen 
   door 20 
   playrepeat   PolyMove 
end
and make the sound available to the polyobject in the Polyobj_StartLine,
giving it the sound sequence number from SNDSEQ, in this case 20.
mikenet2007
Posts: 340
Joined: Wed Jan 24, 2007 8:54 pm

Re: Getting sound for a sliding door.

Post by mikenet2007 »

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 :P
mikenet2007
Posts: 340
Joined: Wed Jan 24, 2007 8:54 pm

Re: Getting sound for a sliding door.

Post by mikenet2007 »

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

Post by Kappes Buur »

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.

Image

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
As you can see, the sounds are now associated with an event name.

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

Image

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.
mikenet2007
Posts: 340
Joined: Wed Jan 24, 2007 8:54 pm

Re: Getting sound for a sliding door.

Post by mikenet2007 »

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. :oops:
mikenet2007
Posts: 340
Joined: Wed Jan 24, 2007 8:54 pm

Re: Getting sound for a sliding door.

Post by mikenet2007 »

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. :)
mikenet2007
Posts: 340
Joined: Wed Jan 24, 2007 8:54 pm

Re: Getting sound for a sliding door.

Post by mikenet2007 »

How about making a polyobj door only open with a keycard? How do I do that?
User avatar
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.

Post by Kappes Buur »

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.
mikenet2007
Posts: 340
Joined: Wed Jan 24, 2007 8:54 pm

Re: Getting sound for a sliding door.

Post by mikenet2007 »

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

Post by Kappes Buur »

Hopefully these examples will be helpful:

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:
mikenet2007
Posts: 340
Joined: Wed Jan 24, 2007 8:54 pm

Re: Getting sound for a sliding door.

Post by mikenet2007 »

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

Return to “Editing (Archive)”