self:set_pitch_scale

Client

Sets the pitch scale of the audio-3d instance


Syntax

local status = self:set_pitch_scale(
    value
)

Parameters

TypeNameDescription
floatvaluePitch multiplier to apply - where 1.0 is normal pitch and 2.0 doubles it and so on
Higher or lower values scale accordingly

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set a higher pitch on an audio-3d instance
local entity = core.audio_3d.create("sounds/sfx.ogg")

entity:set_pitch_scale(1.5)

On this page