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|__EDIT_ME__}}
{{FuncDescription|Sets the sound pitch.}}


{{FuncSyntax|SetSoundPitch(sound, Pitch)}}
{{FuncSyntax|SetSoundPitch(sound, Pitch)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|sound|__EDIT_ME__}}
{{FuncParam|sound|The sound identifier.}}
{{FuncParam|Pitch|__EDIT_ME__}}
{{FuncParam|Pitch|The pitch in floating point. Between 0 and 10. }}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Returns '''true''' on success.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang='Lua'>
if (IsValidSound(soundId)) then
        SetSoundPitch(soundId, 0.5) -- Half the sound pitch
end
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{SoundFunctions}}

Latest revision as of 21:34, 27 October 2020

SetSoundPitch

Type: Function
Context: Client
Introduced: v1.0

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

See also