664a2ae5e5113

664a2ae5e5765
1 Guest is here.
 

Topic: Switching sound on and off Read 1118 times  

664a2ae5e5d79
Anybody?

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

664a2ae5e5e6clostone1993

664a2ae5e5ec5
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
664a2ae5e621c
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.
664a2ae5e634b
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.

664a2ae5e64feNameless Voice

664a2ae5e654e
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.

664a2ae5e6800voodoo47

664a2ae5e6850
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.

664a2ae5e6948ZylonBane

664a2ae5e6993
Try adding the "TurnedOff" flag?
664a2ae5e6aee
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.

664a2ae5e6f23voodoo47

664a2ae5e6f7b
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 »
664a2ae5e711f
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

664a2ae5e7222voodoo47

664a2ae5e726e
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?
664a2ae5e739a
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...

664a2ae5e745dvoodoo47

664a2ae5e74a9
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.
It is absurdly, impossibly cool.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
664a2ae5e75b3