Jump to content
The Dark Mod Forums

Door movement sounds on open and close


SneaksieDave

Recommended Posts

Couple of door sound questions:

 

1. What is the correct way (or a clever one) to set up a door to have sounds that play upon start of movement in both the open and close directions? Currently it seems snd_open does this for opening, but snd_close doesn't play on start of movement but rather end of movement (upon closing). Great for a KLUNK! closing sound, but not for a movement/scraping/whatever sound.

 

Devs: if this is currently not supported, can it be? Pretty much a needed property. I might just be missing the correct way though...

 

2. If such sounds are longer than the actual door movement, the sound doesn't cut off properly; instead it keeps playing for the full length, even if the door is open/closed. Limitation, or am I missing the proper way to implement it? I'm sure it can be scripted, but this should be proper canned behavior.

Link to comment
Share on other sites

That's same the problem while I was making doors of cells in my old map. Thanks to button, door has a sound on both opening and closing. It plays the sound file on closing reversely. Besides, you should be careful on duration of the sound and movement of the door. Check the attachment for better understanding.

Edited by SiyahParsomen
Link to comment
Share on other sites

The closest you can get with what's currently available is to use snd_move. This sound will play when the door is opening and when it's closing. The drawback is that it's the same sound both ways. For a squeaking/scraping door, that's okay.

 

If you get into scripting, then you can keep track of whether the door is open or closed with frob stims, and play a sound when an open door is frobbed. I don't know if there's a boolean test like $doorname.isOpen() that could be used instead.

 

Door events aren't symmetric. We have this problem with sounds, and there's also a problem with triggers. You can trigger something when a door begins to open, when it's fully opened, and when it's fully closed. But you can't trigger something when a door begins to close. If we had that, then you could trigger your closing sound with it.

 

 

 

 

Link to comment
Share on other sites

The closest you can get with what's currently available is to use snd_move. This sound will play when the door is opening and when it's closing. The drawback is that it's the same sound both ways. For a squeaking/scraping door, that's okay.

 

If you get into scripting, then you can keep track of whether the door is open or closed with frob stims, and play a sound when an open door is frobbed. I don't know if there's a boolean test like $doorname.isOpen() that could be used instead.

 

Door events aren't symmetric. We have this problem with sounds, and there's also a problem with triggers. You can trigger something when a door begins to open, when it's fully opened, and when it's fully closed. But you can't trigger something when a door begins to close. If we had that, then you could trigger your closing sound with it.

 

 

 

Checked the prefab again and I may wrong on playing the sound on closing reversely. Anyway, snd_move is shortcut instead of using frob_peer with a button.

Link to comment
Share on other sites

Yep @what grayman said. And it could no doubt be done with script.

 

The button method in the map above suffers the problem where if the player frobs again during mid-movement the sound replays, so you can get multiple movement sounds playing overtop one another.

 

An 'acceptable' method is to use the snd_move property for movement scraping, and then 'silence' out the snd_open and snd_close. It's far from ideal, but the sounds are handled lopsided -- open plays from the start, and closed plays from the end. Both should play from start of movement. The problem this creates is while an open sound can include pre-scrapes and then a klatch at end, the close movement cannot have scrapes at the beginning with a klatch at end... because the whole dang sound plays once the door stops!

 

You can have a stand-alone klatch at end of close, with a _move scrape... but then what about the open sound? Ugh.

 

Maybe I'll submit an issue and see if anything comes of it. This really should be pre-canned behavior.

Link to comment
Share on other sites

Hm, if "snd_close" is player _after_ the door closed, we should probably leave it add "snd_onclose" (or something along these lines) which is played from exactly "-X ms" (where X is the length of the sound in ms) before the door would close.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

The current sound timings are useful and good, so it just sounds like we need more options added as well, not necessarily to change the ones that already exist

shadowdark50.gif keep50.gif
Link to comment
Share on other sites

It's actually only good for the default doors. If different sounds are needed (metal portcullis, stone door...) we're lacking there (flexible useful sounds). And if those doors need sounds at end of open and start of close, we're lacking (code). If the user wants scrapes, they're further at a loss, unless those sounds exist (sounds), not to mention they'll overlap with open and close sounds, if the code doesn't support a fix for that (code). And the open/close sounds only work if they are of the exact right length for the door movement (code, sound).

 

We could go the route of having "smart" doors, which require code changes:

 

* snd_open plays from start (already works, more sounds needed)

* snd_move not needed

* snd_close plays from start of movement toward close (needs coding, more sounds needed)

 

(of course there could also be sounds at end of open and start of close...)

 

 

Or simply get a bunch of new sounds which support the existing model:

 

* snd_open plays from start (already works, more sounds needed)

* snd_move plays during the movement (already works, more sounds needed)

* snd_close plays when door stops moving (just the klatch; already works, more sounds needed)

 

I favor the second method, as it is most flexible for the mapper. You can have a silent open if you wish, or a silent close if you wish, or a silent move if you wish. The other method isn't so flexible and is IMO messy.

 

However, both methods have significant legwork in the way:

 

Method one requires coding. How likely that is to happen, you'd have to ask programmers.

Method two requires a sound department. Good luck with that.

Link to comment
Share on other sites

Would it be possible to add a speaker, triggered by the door mover, but only when the door closes and not triggered when the mover opens?

Perhaps using 'trigger_on_close' '1' and 'trigger_on_open' '0' to trigger the speaker?

I suppose that would mess up anything else which gets triggered by the door mover.

 

How about cloning the door/mover, putting it either out of sight or use 'nodraw' and use that one with 'trigger_on_close' to trigger a speaker with the desired sound? Then the main door can be used with its assigned open and closed sounds and even have a speaker for its sound while in motion if needed, yet have a custom sound which only triggers when the door starts to close.

 

OOOPS... I just read the tooltip for 'trigger_on_close', and it is the one which triggers when fully closed. Doh! I should know that, I used it in my test map twice already.

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

The more I worked with it and thought about it, the more I think having separate start-of-open, movement, and end-of-close movements is, while not ideal, the combination of best and easiest. It already works this way, just needs proper sounds (of which we don't have many at the moment). So, more a sound issue than one of code.

Link to comment
Share on other sites

The more I worked with it and thought about it, the more I think having separate start-of-open, movement, and end-of-close movements is, while not ideal, the combination of best and easiest.

 

As far as I remember this is what the original games did (which is what I always consider when in doubt).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 1 reply
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
×
×
  • Create New...