EmitSentence

From Garry's Mod
Jump to: navigation, search
 EmitSentence( )

Contents

Description

Plays a sentence from scripts/sentences.txt

Arguments

string soundName

The sound to play

Arguments

Vector position

The position to play at

Arguments

number entity

The entity to emit the sound from. Must be Entity:EntIndex

Arguments

number channel=CHAN_AUTO

The sound channel, see CHAN_ Enums.

Arguments

number volume=1

The volume of the sound, from 0 to 1

Arguments

number soundLevel=75

The sound level of the sound, see SNDLVL_ Enums

Arguments

number soundFlags=0

The flags of the sound, see SND_ Enums

Arguments

number pitch=100

The pitch of the sound, 0-255

Examples

Example

Plays random combine death sound on first player.

EmitSentence( "COMBINE_DIE" .. math.random( 0, 3 ), Entity(1):GetPos(), 1, CHAN_AUTO, 1, 75, 0, 100 )


Personal tools
Navigation