HU/setSoundPaused: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
{{New feature/item|3.0132|1.3.2|| | {{New feature/item|3.0132|1.3.2|| | ||
Használja a játékos elemet a játékosok hangjának szabályozásához. | |||
}} | }} | ||
==Syntax== | ==Syntax== |
Revision as of 10:06, 22 July 2018
Ez a funkció a meghatározott hangelem lejátszásának szüneteltetésére vagy feloldására szolgál.
Használja a játékos elemet a játékosok hangjának szabályozásához.
Syntax
bool setSoundPaused ( element theSound, bool paused )
OOP Syntax Help! I don't understand this!
- Method: sound:setPaused(...)
- Variable: .paused
- Counterpart: isSoundPaused
Required Arguments
- theSound: the sound element which you want to pause/unpause.
- paused: a boolean value representing whether the sound should be paused or not. To pause the sound, use true.
Returns
Returns true if the sound element was successfully paused, false otherwise.
Example
This example will allow the user to toggle sounds from paused to playing, and from playing to paused
Click to collapse [-]
ClienttheSound = playSound("music/song.mp3", true) function togglePausedSound() if(isSoundPaused(theSound)) then --sound is paused, un-pause it setSoundPaused(theSound, false) else --sound is not paused, pause it setSoundPaused(theSound, true) end end addCommandHandler("pausesound", togglePausedSound)
Changelog
Version | Description |
---|
1.3.2 | Added player element for voice control |
See Also
- HU/getRadioChannel
- HU/getRadioChannelName
- HU/getSFXStatus
- HU/getSoundBPM
- HU/getSoundEffects
- HU/getSoundFFTData
- HU/getSoundLength
- HU/getSoundLevelData
- HU/getSoundMaxDistance
- HU/getSoundMetaTags
- HU/getSoundMinDistance
- HU/getSoundPan
- HU/getSoundPosition
- HU/getSoundProperties
- HU/getSoundSpeed
- HU/getSoundVolume
- HU/getSoundWaveData
- HU/isSoundPanningEnabled
- HU/isSoundPaused
- HU/playSFX
- HU/playSFX3D
- HU/playSound
- HU/playSound3D
- HU/playSoundFrontEnd
- HU/setRadioChannel
- HU/setSoundEffectEnabled
- HU/setSoundMaxDistance
- HU/setSoundMinDistance
- HU/setSoundPan
- HU/setSoundPanningEnabled
- HU/setSoundPaused
- HU/setSoundPosition
- HU/setSoundProperties
- HU/setSoundSpeed
- HU/setSoundVolume
- HU/stopSound