[No] Unlock sound for locks

Moderator: Developers

Unlock sound for locks

Postby Nightfall » Sun Jul 15, 2012 5:14 pm

I was casually building up my auto-load wad again and I noticed that there was a sound entry when a player fails to open a lock, but none for the actual success. So I decided to just as well make one. Diff attached.

BTW, I've changed my nickname to "Dusk" long ago (I think a year ago from now o.O), I'd appreciate updation of my zdoom forum username.
Attachments
unlocksound-2.diff.zip
(2.61 KiB) Downloaded 7 times
Last edited by Nightfall on Mon Jul 16, 2012 4:34 am, edited 2 times in total.
User avatar
Nightfall
NO U
 
Joined: 06 Aug 2009
Location: Finland

Re: Unlock sound for locks

Postby Graf Zahl » Sun Jul 15, 2012 5:47 pm

I see one problem with this: It plays the sound every time you try to open a locked door. But shouldn't it do that only for the first time? Also, what about opening the same door from the other side?

I'm sorry but this is a bit too primitive for my taste.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: Unlock sound for locks

Postby Nightfall » Sun Jul 15, 2012 6:25 pm

I guess I could tinker something like that..
User avatar
Nightfall
NO U
 
Joined: 06 Aug 2009
Location: Finland

Re: Unlock sound for locks

Postby Nightfall » Mon Jul 16, 2012 4:37 am

Alright opening post updated. It's a bit smarter now: it checks any line that shares a sector with the line being opened and shares the exact same special, and marks them - and itself - as "unlocked". The unlock sound only plays if the line wasn't marked unlocked prior. There's a new bool in line_t, and a new line_t argument in P_CheckKeys now.

It probably still won't work exactly 100% spot on in every situation ever but hey I call it an improvement. :P
User avatar
Nightfall
NO U
 
Joined: 06 Aug 2009
Location: Finland

Re: Unlock sound for locks

Postby .+:icytux:+. » Wed Jul 18, 2012 1:57 pm

doesn't doors usually need to be reunlocked everytime in real life? I thought the first behaviour was a better one. Not to mention that the game requires you to have the key on you every time you try to open a locked door, i mean basically the doors re-lock themselves in doom anyway, why make the sound behave as if the door only needs to be unlocked once?
User avatar
.+:icytux:+.
Mr. Happy of the Day!
 
Joined: 17 May 2007
Location: Finland

Re: Unlock sound for locks

Postby Graf Zahl » Wed Jul 18, 2012 3:35 pm

Wouldn't that get annoying very quickly?

Personally, I can't say I like this feature to begin with. It strikes me as limited and overall pointless because if you want to do sound effects on a locked door an ACS script would be suited much better for it.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: Unlock sound for locks

Postby Enjay » Wed Jul 18, 2012 5:29 pm

Graf Zahl wrote:if you want to do sound effects on a locked door an ACS script would be suited much better for it.

That's how I would normally do it. That way, I get to pick the sound and how often it plays for every instance.

Is it possible to add a UDMF "field" (or whatever line arguments are called in UDMF) for locked door specials to take an unlock sound argument? If so, that might be a little more flexible than the original suggestion.
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

Re: Unlock sound for locks

Postby Graf Zahl » Thu Jul 19, 2012 1:54 am

You can do a lot of stuff but I'm quite hesistant to add a feature that could be implemented on the mapper's side with minimal scripting. You do not need an engine feature for everything.

In this particular case my main issue is that there is no or insufficient control over the sound being played. It's either always or some crudely implemented logic to avoid that and technically it can't be done better.
This feature falls in the 'nice on the surface but ultimately pointless' category and now that I've made up my mind about it I know what to do with it...

To be clear: I like how Quake 2's locked doors work - but this is not the right approach.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: Goper Nyth and 0 guests