Small SNDSEQ problem

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.

Small SNDSEQ problem

Postby AntiRellik » Sun Jul 18, 2010 4:50 pm

Hi guys
I added new sounds to my Pk3 for my swinging doors. My sounds are defined and this is what I got in SNDSEQ:
Code: Select allExpand view
:SeqSwingDoor
   door 5
   play DoorCrack
   stopsound DoorStop
end


It works perfect, my problem is that I want to use another sound when the door closes.
It plays DoorCrack while opening and closing, and of course, DoorStop when the polyobject movement stops.
The SNDSEQ article in the Wiki wasn't very useful for this matter.
It has this example that shows how to specify the sounds in the lump
Code: Select allExpand view
[DoorMine
 Door 1
 0  MyDoorOpen
 1  MyDoorClose
 2  MyDoorFastOpen
 3  MyDoorFastClose
]


I haven't gotten that to work, and if it were to work I'd still like to keep the stopsound. I tried using playrepeat too but it didn't work either. :?
Any help is greatly appreciated =)
AntiRellik
 
Joined: 28 Aug 2009

Re: Small SNDSEQ problem

Postby Ceeb » Sun Jul 18, 2010 5:06 pm

I'm not 100% on this, but SoundSequenceOnPolyobj may be what you need.
User avatar
Ceeb
Official Idoit Of ZDoom
Banned User
 
Joined: 11 Jun 2008
Location: Castle Wut

Re: Small SNDSEQ problem

Postby randi » Sun Jul 18, 2010 6:17 pm

Modify your SeqSwingDoor sequence by removing the "Door 5" line and rename it (if desired):
Code: Select allExpand view
:SeqSwingDoorOpen
   play DoorCrack
   stopsound DoorStop
end

Now create SeqSwingDoorClose that you want played when the door closes, like this:
Code: Select allExpand view
:SeqSwingDoorClose
   play DoorCrackClose
   stopsound DoorStop
end

Then you tie the two together into a single selector sound sequence. This sequence doesn't play any sounds but rather groups together otherwise distinct sequences so that they play for different conditions on the object. Note that the "Door 5" that was in the original SeqSwingDoor is on this one, since this is the sequence that actually gets attached to an object:
Code: Select allExpand view
[SeqSwingDoor
   Door 5
   0 SeqSwingDoorOpen
   1 SeqSwingDoorClose
   2 SeqSwingDoorOpen
   3 SeqSwingDoorClose
]

If you need more examples, please refer to the sndseq.txt in zdoom.pk3.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003

Re: Small SNDSEQ problem

Postby AntiRellik » Sun Jul 18, 2010 8:27 pm

Whoa that worked like a charm!
Thanks a lot! So that last definition was actually to tie up sound sequences... I should of realized that before. :oops:
Thats a lot guys =D
AntiRellik
 
Joined: 28 Aug 2009

Re: Small SNDSEQ problem

Postby Double(Super)Shotgun » Thu Jun 25, 2015 9:45 pm

In case anyone's slow like me, the example above goes like this in its entirety into SNDSEQ:

Code: Select allExpand view
:SeqSwingDoorOpen
   play DoorCrack
   stopsound DoorStop
end

:SeqSwingDoorClose
   play DoorCrackClose
   stopsound DoorStop
end

[SeqSwingDoor
   Door 5
   0 SeqSwingDoorOpen
   1 SeqSwingDoorClose
   2 SeqSwingDoorOpen
   3 SeqSwingDoorClose
]


So you'd want to include both the individual open and close definitions, AS WELL AS the collection thingy at the end. Also, for some reason using the simple lump name wasn't working for me, but it worked just fine after I gave it an alias in SNDINFO.
Double(Super)Shotgun
 
Joined: 25 Jul 2014

Re: Small SNDSEQ problem

Postby Hindsight2020 » Sat Jun 27, 2015 4:04 am

Funny, I was just having an eerily similar issue today. Except my issue seemed to be that I wanted a latch sound to occur as StopSound. It took me a bit to realize that the StopSound wouldn't play if the polyobject completed its motion after the sequence had complete. I had to shorten my polyobject movement or pick a longer door creak. I decided instead to go with this exact setup and create my own collection of sounds. Lol

I still can't figure out, tho, why "play sound1" won't work and I have to use "playuntildone sound1" instead?
User avatar
Hindsight2020
 
Joined: 20 Mar 2013
Location: Indiana, USA


Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 0 guests