sound.Play

From Garry's Mod
Jump to: navigation, search
 sound.Play( )

Contents

Description

Plays a sound from the specified position in the world. If you want to play a sound without a position, such as a UI sound, use surface.PlaySound instead.

Arguments

string Name

A string path to the sound.

Arguments

Vector Pos

A vector describing where the sound should play.

Arguments

number Level

Sound level in decibels. 75 is normal. Ranges from 20 to 180, where 180 is super loud. This affects how far away the sound will be heard.

Arguments

number Pitch

An integer describing the sound pitch. Range is from 0 to 255. 100 is normal pitch.

Arguments

number Volume

A float ranging from 0-1 describing the output volume of the sound.

Examples

Example

Plays an explosion sound at the (0, 0, 0) map coordinates.

sound.Play( "ambient/explosions/exp1.wav", Vector(0, 0, 0) )


Personal tools
Navigation