Skip to content

Entity:EmitSound pitch and volume cannot be changed with soundscripts that define it #6725

Description

@sevmonster

Details

If this is intentional, the wiki should be updated to add this info for these two parameters as well.

Steps to reproduce

For example, these work:

local volume, pitch = 0.5, 150
EmitSound("Wood.StepLeft", Entity(1):GetPos(), Entity(1):EntIndex(), nil, volume, nil, nil, pitch)
Entity(1):EmitSound("player/footsteps/wood1.wav", nil, pitch, volume)

But this doesn't:

local volume, pitch = 0.5, 150
Entity(1):EmitSound("Wood.StepLeft", nil, pitch, volume)

Test:

lua_run hook.Add("EntityEmitSound", "test", PrintTable)
lua_run local volume, pitch = 0.5, 150 Entity(1):EmitSound("Wood.StepLeft", nil, pitch, volume)
["Ambient"]	=	false
["Channel"]	=	0
["DSP"]	=	0
["Entity"]	=	Player [1][sev]
["Flags"]	=	0
["OriginalSoundName"]	=	Wood.StepLeft
["Pitch"]	=	100
["SoundLevel"]	=	75
["SoundName"]	=	player/footsteps/wood3.wav
["SoundTime"]	=	0
["Volume"]	=	1

Version of the game

] version
Protocol version 24
Network version 2025.03.26 (garrysmod)
Exe build: 16:44:26 Feb  4 2026 (9951) (4000)
GMod version 2026.02.06, branch: x86-64, multicore: 1
Linux 64bit

Beta

x86-64 beta

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions