SetSoundPitch: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Info|Function|Client|1.0}} | {{Info|Function|Client|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Sets the sound pitch.}} | ||
{{FuncSyntax|SetSoundPitch(sound, Pitch)}} | {{FuncSyntax|SetSoundPitch(sound, Pitch)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|sound| | {{FuncParam|sound|The sound identifier.}} | ||
{{FuncParam|Pitch| | {{FuncParam|Pitch|The pitch in floating point. Between 0 and 10. }} | ||
{{FuncReturnValue| | {{FuncReturnValue|Returns '''true''' on success.}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang='Lua'> | |||
if (IsValidSound(soundId)) then | |||
SetSoundPitch(soundId, 0.5) -- Half the sound pitch | |||
end | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{SoundFunctions}} | |||
Latest revision as of 21:34, 27 October 2020
Description
Sets the sound pitch.
Syntax
SetSoundPitch(sound, Pitch)
Parameters
- sound
The sound identifier. - Pitch
The pitch in floating point. Between 0 and 10.
Return Value
- Returns true on success.
Example
if (IsValidSound(soundId)) then
SetSoundPitch(soundId, 0.5) -- Half the sound pitch
end