665240e2d6d74

665240e2d7510
1 Guest is here.
 

Topic: Switching sound on and off Read 1162 times  

665240e2d7a2e
Anybody?

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

665240e2d7b11lostone1993

665240e2d7b62
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
665240e2d7f07
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.
665240e2d8024
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.

665240e2d81d2Nameless Voice

665240e2d821f
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.

665240e2d850avoodoo47

665240e2d855c
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.

665240e2d8649ZylonBane

665240e2d86c1
Try adding the "TurnedOff" flag?
665240e2d88e0
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.

665240e2d8e55voodoo47

665240e2d8ee6
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 »
665240e2d9066
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

665240e2d9157voodoo47

665240e2d91a9
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?
665240e2d92cd
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...

665240e2d9399voodoo47

665240e2d93e5
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.
At first you can't hear the pole holding up the sign ... but it has a sound shadow that's many feet long.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
665240e2d94d9