666fb661392e7

666fb661398b3
1 Guest is here.
 

Topic: Switching sound on and off Read 1299 times  

666fb66139d94
Anybody?

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

666fb66139e6elostone1993

666fb66139ebc
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
666fb6613a1dc
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.
666fb6613a315
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.

666fb6613a4ffNameless Voice

666fb6613a567
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.

666fb6613a7edvoodoo47

666fb6613a842
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.

666fb6613a946ZylonBane

666fb6613a998
Try adding the "TurnedOff" flag?
666fb6613ab13
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.

666fb6613af0cvoodoo47

666fb6613af60
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 »
666fb6613b0af
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

666fb6613b187voodoo47

666fb6613b1d1
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?
666fb6613b2fb
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...

666fb6613b42bvoodoo47

666fb6613b47d
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.
Oh mein Roboter, mit Onyxaugen.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
666fb6613c3d2