Jump to content
The Dark Mod Forums

How do I remove an inherited entity property?


Nort

Recommended Posts

I've run into a sound issue while assembling a little dresser prefab.

There's a great sound for closing a drawer (an "atdm:mover_door_sliding" entity), but it's the sound of a drawer BEING closed, and should therefor be played during "snd_move", and not "snd_close" (at the beginning of the translation, and not once it has finished). If I have no custom "snd_close" property, this value defaults back to a clunky default sound, and if I instead have a "snd_close" and give it either the value "nosound", "0" or "-", the closing sound cuts out, since now the sound of "nosound" is playing instead.

Is there some way to uninherit an inherited property (like for example the "snd_close" property)?

 

Link to comment
Share on other sites

Edit: I wrote a lot trying to speculate about what your root problem was. I think I've boiled it down to the solution that's just written at the bottom in Edit3, if you want to cut to the chase. 

---

Replacing a spawnarg does the same thing as changing the inheritance.

Okay, to literally answer your question, you could make a duplicate of the class entity from which it's inheriting "snd_closed", and then delete or replace that "snd_closed" with "nosound", "0", or "-", then have the inheritance call that modified duplicate version. But then it's just going to cut off again after snd_move ends like you just said you don't want. So that doesn't really solve your problem. So don't do that.

It appears that the problem isn't snd_closed per se. It's that you don't have a transition sound from snd_move to silence.

What I think you should do is use a sound editor like Audacity, take the end of the snd_move file, and then make a new & clean cut off sound at the end, like a quick fade off or play with the manipulations until it sounds like a drawer stopping would actually sound. Be sure to crop it so your fade off sound seamlessly fits the end of the snd_move. Then package your new sound in the sound folder for your mission and make a new sound shader for it, and then fill "snd_close" with the address to that sound. Read the wiki page on custom sounds for the details.

Edit: Unless I don't understand your situation.

------

Edit2: It sounds like a timing issue, like snd_close is happening (and cutting off snd_move) before you want it to. In fact, you don't want snd_close at all. Is that right?

Okay, here's the issue.

The way the system is designed is to allow for closing sounds of any arbitrary length. So it plays snd_move as long as its moving, sometimes long, sometimes short, then snd_close plays at the moment it's finished. So you'd want to always break up your sound into two parts, one for the "still moving part" that can play on repeat for any length of time, and one for the bang of the closed part that plays only at the end it, that would fit just as well if snd_move only played 1/2 way through or if it played 3 times. So then you always get a seamless move and close sequence for any arbitrary duration from half a second to 5 seconds or whatever. Would that fix your issue?

It kind of looks like you want a combined move & closed part in one sound file. But the system is not really designed for that. It's designed to play while_moving -> snd_move, at_end -> snd_closed in sequence, so you make your sounds fit that template. If you want to change that template itself, so it only plays snd_move to its end every time no matter what, now (I think) you're talking sourcecode changes, which is not something you can just fix for your FM. (But I'm not 100% sure about that. There may be a way to do that, but I don't know about it.)

------

Edit3: Oh, well if it's that last part that you want, then there's another really simple thing you can do, which is completely cut out the snd_move and snd_close altogether, use "nosound" for both, but when somebody frobs the drawer, have it like a button that calls a speaker attached to the drawer that just plays your close sound as a one-shot independent sound.

It will get rid of your cut-off problem. But the catch is, you'll need to set up a script or trigger system so it only plays every other time (when closing, not when opening; unless you want it when it's opening too, in which case just trigger it every time).

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Inheritance is controlled from above.

If you need something that isn't defined directly in your own entity, you need to keep moving up the tree until you find the entity that has the attribute you wanna change and clone that one with alternate values. Of course you will also need to repeat this process for all the intermediaries so that the new entity hierarchy is preserved. Though, with the PK4 override system you can just use the modified entity at the top of the tree with the same name. (not as clean but a little more convenient)

Alternately, grab all the attributes you want from all entities in the tree and just add them all to one entity.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

6 hours ago, demagogue said:

The way the system is designed is to allow for closing sounds of any arbitrary length. So it plays snd_move as long as its moving, sometimes long, sometimes short, then snd_close plays at the moment it's finished. So you'd want to always break up your sound into two parts, one for the "still moving part" that can play on repeat for any length of time, and one for the bang of the closed part that plays only at the end it

This is a bit funny, because the sound I'm refering to, is your stock "frob_drawer_close" sounds ("frob_drawer_close01.ogg" and "frob_drawer_close02.ogg"). It's possible that the dev team has already split them up into proper move and closed sounds, in a post-2020 update, but otherwise, consider doing that.

 

"It sounds like a timing issue, like snd_close is happening (and cutting off snd_move) before you want it to. In fact, you don't want snd_close at all. Is that right?"

To clarify: Yes.

Your Edit 3 solution will also likely work very well as a makeshit solution.

Thank you both.

 

Edited by Nort
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

    • 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.
      · 5 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
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...