666fc0845fb5e

666fc0846011b
1 Guest is here.
 

Topic: Switching sound on and off Read 1300 times  

666fc08460763
Anybody?

Basically want to switch a sound on during an event, then switch it off after event.

666fc08460882lostone1993

666fc084608df
hmm, I dont think you can switch sound on and off, but you might be able to use a trap to move a sound object back and forth, or destory and spawn to achieve the same effect

Il have a more detailed look once I am back on my laptop with shocked
666fc08460c87
hmm, I dont think you can switch sound on and off, but you might be able to use a trap to move a sound object back and forth, or destory and spawn to achieve the same effect

Il have a more detailed look once I am back on my laptop with shocked

I was getting mildly tired of moving things around with teleport traps, but I suppose if I have to do it I will lol

If there is another way to do it, that would be great :) I'll play around awaiting your response.
666fc08460dd7
You can turn sounds on and off with the appropriate signal type, turn off from a signal via inverter turns off a sound trap as eg.

Or make a sound clip of correct length.

666fc08460fd6Nameless Voice

666fc0846103d
If your sound is an ambient sound (AmbientHacked property), you can turn it on or off with the TrapAmbientOff script.

TurnOn should turn the sound on, and TurnOff should turn it off.

666fc0846136cvoodoo47

666fc084613c6
You can turn sounds on and off with the appropriate signal type, turn off from a signal via inverter turns off a sound trap as eg.
any chance you could explain this a bit more? I need to set up an enviro sound to start turned off, then turn it on via a triggerdelay.

666fc08461525ZylonBane

666fc08461584
Try adding the "TurnedOff" flag?
666fc084616dd
If it's a sound trap (actually, trapsoundamb for ambients), then a turn on (ie a standard switchlink from any controller, or via scripting) will turn the sound schema set in sound: object sound to on. To turn it off, send it via an inverter to switch it to a TurnOff signal, or use something that generates turn offs automatically like twostatebutton script. If it's ambient, use NV's solution instead as ambient have better propagation controls, add the script to the ambient marker and set it to be inactive by default/ at start on the standard ambienthacked property as per ZB.

666fc08461bc5voodoo47

666fc08461c24
If it's a sound trap (actually, trapsoundamb for ambients), then a turn on (ie a standard switchlink from any controller, or via scripting) will turn the sound schema set in sound: object sound to on.
ok, this worked pretty well, but is there a way to control the radius? it is quite small when using a sound trap, and (seems) infinite when using ambient sound trap.

use NV's solution instead as ambient have better propagation controls, add the script to the ambient marker and set it to be inactive by default/ at start on the standard ambienthacked property
I will need some more/simpler explanation I'm afraid. not the brightest bulb here, remember?

//I've tried to set up a tripwire switchlinked to an inverter, switchlinked that to an ambient soundtrap with ambienthacked prop, with the intention of turning the sound off once the tripwire is triggered. this did not work.
« Last Edit: 20. October 2013, 18:29:33 by voodoo47 »
666fc08461da8
You need to add TrapAmbientOff to the ambient marker as well, not sure if you did. If you want radius control then you will need to use ambienthacked as the soundtrap will either have no dispersion if ambient or a set dispersion based on the sound level/ flags of the schema.

To turn the sound off, add the above script to the marker, create a trigger (tripwire/ button) and link that to an inverter, and the inverter to the ambient marker. If you use a standard tripwire there may be problems triggering it multiple times, if you just want it turned on->off, once, then you may want to use a once tripwire, or to piggyback something plot related that happens once only.
Acknowledged by: voodoo47

666fc08461ea7voodoo47

666fc08461efb
ok, apparently I'm dumb. tried this:

tripwire(player,enter,once)->switchlink->inverter->switchlink->marker(ambienthacked with the desired sound,script TrapAmbientOff)

if I understand correctly, this should start out with the sound being played, and disable it once player enters the tripwire. well, it does play, but doesn't stop when the tripwire is triggered. tried it with plain marker, sound trap, ambient sound trap, all the same.

what am I missing here?
666fc08462043
Try it without the inverter.

I think NV's instructions may be wrong way around, ie TurnOn turns the sound off and TurnOff turns the sound on. My quick test had it work (ie turn sound off) with a straight tripwire -> marker. Should be the other way around as that is the way everything else works including the sound traps, but seems to be other way round by actual testing, so...

666fc08462119voodoo47

666fc0846216d
confirming - a TurnOn signal (no inverter) will turn the sound off, and TurnOff (inverter) will turn it back on (at least for a marker with an ambienthacked prop, that is).

we should probably make a note about this somewhere in the Shocked guides.


thanks for the help.
1 Guest is here.
There's more to life than just pleasing you.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
666fc08465705