HU/isSoundPanningEnabled: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
No edit summary  | 
				No edit summary  | 
				||
| Line 6: | Line 6: | ||
{{Tip|Bár ez a funkció nem 3D-ben működik (melyeket a [[playSound]] készített), csak 3D hangokkal van értelme használni (melyek [[playSound3D]]-vel készültek). Tekintse meg a [[setSoundPanningEnabled]]-et annak érdekében, hogy ez a tulajdonság mit csinál.}}  | {{Tip|Bár ez a funkció nem 3D-ben működik (melyeket a [[playSound]] készített), csak 3D hangokkal van értelme használni (melyek [[playSound3D]]-vel készültek). Tekintse meg a [[setSoundPanningEnabled]]-et annak érdekében, hogy ez a tulajdonság mit csinál.}}  | ||
==  | ==Szintaxis==  | ||
<syntaxhighlight lang="lua">  | <syntaxhighlight lang="lua">  | ||
bool isSoundPanningEnabled ( element theSound )  | bool isSoundPanningEnabled ( element theSound )  | ||
| Line 12: | Line 12: | ||
{{New feature/item|3.0141|1.4.0|6987|{{OOP||[[sound]]:isPanningEnabled|panningEnabled|setSoundPanningEnabled}}}}  | {{New feature/item|3.0141|1.4.0|6987|{{OOP||[[sound]]:isPanningEnabled|panningEnabled|setSoundPanningEnabled}}}}  | ||
===  | ===Kötelező Argumentumok===    | ||
*'''theSound :''' A valid [[sound]] [[element]].  | *'''theSound :''' A valid [[sound]] [[element]].  | ||
===  | ===Visszaadott érték===  | ||
Returns ''true'' if the sound is valid and it has panning enabled, ''false'' if it does not or is not valid.  | Returns ''true'' if the sound is valid and it has panning enabled, ''false'' if it does not or is not valid.  | ||
==  | ==Példa==  | ||
This example plays a ''xy.mp3'' file in the root folder of the resource which contains it at the center of the map, and proves that by default a sound enables panning by outputting the result of this function to the chatbox right after creating it. Then it disables the panning of the sound.  | This example plays a ''xy.mp3'' file in the root folder of the resource which contains it at the center of the map, and proves that by default a sound enables panning by outputting the result of this function to the chatbox right after creating it. Then it disables the panning of the sound.  | ||
| Line 40: | Line 40: | ||
[[en:IsSoundPanningEnabled]]  | [[en:IsSoundPanningEnabled]]  | ||
==Fordította==  | |||
Surge  | |||
Revision as of 15:50, 19 July 2018
Ez a funkció ellenőrzi, hogy a panning engedélyezve van-e egy hangelemben, vagy sem.
| Tip: Bár ez a funkció nem 3D-ben működik (melyeket a playSound készített), csak 3D hangokkal van értelme használni (melyek playSound3D-vel készültek). Tekintse meg a setSoundPanningEnabled-et annak érdekében, hogy ez a tulajdonság mit csinál. | 
Szintaxis
bool isSoundPanningEnabled ( element theSound )
OOP Syntax Help! I don't understand this!
- Method: sound:isPanningEnabled(...)
 - Variable: .panningEnabled
 - Counterpart: setSoundPanningEnabled
 
Kötelező Argumentumok
Visszaadott érték
Returns true if the sound is valid and it has panning enabled, false if it does not or is not valid.
Példa
This example plays a xy.mp3 file in the root folder of the resource which contains it at the center of the map, and proves that by default a sound enables panning by outputting the result of this function to the chatbox right after creating it. Then it disables the panning of the sound.
local function testPanning()
    -- Create the sound and output the panning property state
    local sound = playSound3D("xy.mp3", 0, 0, 0)
    outputChatBox("By default, the sound has its panning " .. (isSoundPanningEnabled(sound) and "enabled" or "disabled"))
    -- Disable the panning and ouput a fact
    setSoundPanningEnabled(sound, false)
    outputChatBox("The sound panning was disabled, so it won't annoy you when the camera it's in a side anymore!", 0, 255, 0)
end
addEventHandler("onClientResourceStart", resourceRoot, testPanning)
Requirements
This template will be deleted.
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
 
Fordította
Surge