self:set_pitch_scale
Client
Sets the pitch scale of the audio-2d instance
Syntax
local status = self:set_pitch_scale(
pitch_scale
)Parameters
| Type | Name | Description |
|---|---|---|
float | pitch_scale | Pitch multiplier to apply1.0 is normal pitch, 2.0 doubles it, and higher or lower values scale accordingly |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = core.audio_2d.create("sounds/sfx.ogg")
entity:set_pitch_scale(1.5)