PDA

View Full Version : [Solved] Removing a sound effect?


jasonduskey
10th Nov 2008, 2:41 PM
I'm working on a set of melee weapons cloned from the fingerprint scanner career reward. I have them working, but because they're cloned from this object, they make an annoying buzzing sound when in use. Is there a way to remove this and how can it be done?

Numenor
10th Nov 2008, 5:11 PM
The sounds are triggered in two main ways:

1) Via a "Play Sound" call in one BHAV; in this case, you can simply bypass the line containing the "Play Sound" opcode.

2) Via an animation; this is a little harder. Animations are called within the BHAVs using a "Animate Sim" or "Animate Object" functions; the called animation can then trigger the sound. This situation is harder to deal with, because normally the cloned objects use the Maxis animations, and if you change the Maxis animation (so to remove the sound), all the fingerprint scanners will stop buzzing.
Sometimes it's possible to import the ANIM in the clone, so to modify it locally; but sometimes the ANIMs are called from the semiglobals, and this makes things even harder.

The first thing you should do, is to find out which BHAV (in the clone or in the semiglobals) calls the Play Sound or the Animate Object functions.

jasonduskey
11th Nov 2008, 2:17 AM
I should mention that I imported a whole assload of semiglobals so I could change the skilling from cleaning to body. The calls are in Scan-Animate. There are 3 command lines- 0x18 :[prim 0x0017] Play/ Stop Sound Event (Play "fingerp_lp")
0x19 :[prim 0x0017] Play/ Stop Sound Event (Stop "fingerp_lp")
0x1a :[prim 0x0017] Play/ Stop Sound Event (Stop "fingerp_lp")

I'm pretty sure this is the BHAV that controls the sound. So in this event, would I change the true target of the command line that calls for 0x18 to 0x19?

Edit- I tried this, it didn't seem to work. I've checked all the rest of the object's BHAVs and I don't see anything that controls the sound effect. The ANIM must be called for in a semi-global. Can the Anim be changed locally?

Numenor
11th Nov 2008, 5:25 PM
Good job, you are almost there :)

I probably wasn't clear enough when I talked about "bypassing" the Play instructions; let's examine together the BHAV Scan-Animate.

Line 0x18: this line is called by line 0x09, and in turn calls line 0x03. If you want to "bypass" line 0x18, you need to modify the target of line 0x09, making it point to line 0x03 (instead of line 0x18).

Line 0x19: this is a little more complex, because there are 3 calls in total for this line. Both the True and False target of line 0x04 point to 0x19, as well as the True target of line 0x15; therefore, all these three targets must be changed to 0x0B (i.e. the True target of line 0x19).

Line 0x1A is similar to 0x19: there are multiple lines with targets pointing to 0x1A that must be changed. Homework: what targets must be changed? And to what target should they point? ;)

jasonduskey
12th Nov 2008, 2:26 AM
*scratches head* 0x1A is called for by 0xF (true target) and 0x16 (true target). But 0x1A's true target is True. It doesn't call for another command line. Can it be left unaltered?

Edit: Okay, I think I get it. Change 0xF and 0x16's true target to ... True?

Second Edit: I figured it out. The annoying buzzing sound is gone. Thanx, Numenor.

Numenor
12th Nov 2008, 9:33 AM
Perfect! :) *jasonduskey receives a A+ grade* ;)