SetSoundEffectEnabled: Difference between revisions
Jump to navigation
Jump to search
(OOP) |
No edit summary |
||
Line 36: | Line 36: | ||
{{Client_audio_functions}} | {{Client_audio_functions}} | ||
[[hu:setSoundEffectEnabled]] | |||
[[ar:setSoundEffectEnabled]] | [[ar:setSoundEffectEnabled]] |
Revision as of 19:31, 21 July 2018
Used to enable or disable specific sound effects. Use a player element to control a players voice with this function.
Syntax
bool setSoundEffectEnabled ( element sound, string effectName, bool bEnable )
OOP Syntax Help! I don't understand this!
- Method: sound:setEffectEnabled(...)
Required Arguments
- gargle
- compressor
- echo
- i3dl2reverb
- distortion
- chorus
- parameq
- reverb
- flanger
- bEnable: true if you want to enable the effect, false if you want to disable it.
Returns
Returns true if the effect was set successfully, false otherwise.
Example
This example creates a sound and set's the flanger sound effect enabled.
addCommandHandler("flanger",function(cmd,enabled) if(isElement(waterSplashes))then setSoundEffectEnabled(waterSplashes,cmd,enabled) else waterSplashes = playSound("splashes.mp3",true) setSoundEffectEnabled(waterSplashes,cmd,enabled) end end,true) --set it case sensitive as we are going to get the command name and use it in the setSoundEffectEnabled
Changelog
Version | Description |
---|
1.3.2 | Added player element for voice control |
See Also
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundBufferLength
- getSoundEffectParameters
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundLooped
- isSoundPanningEnabled
- isSoundPaused
- playSFX3D
- playSFX
- playSound3D
- playSound
- setRadioChannel
- setSoundEffectEnabled
- setSoundEffectParameter
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
- Shared
- playSoundFrontEnd