SetSoundPitch: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|SetSoundPitch(sound, Pitch)}} {{FuncParameters}} {{FuncParam|sound|__EDIT_ME__}} {{FuncParam|Pitch..." |
No edit summary |
||
(2 intermediate revisions 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