SoundEventclass

A sound event. It can play a set of random sounds with optionally random settings such as volume and pitch.

objectGameResourceSoundEvent
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public class Sandbox.SoundEvent : Sandbox.GameResource

Constructors2

Showing 2 constructors

Methods1

Showing 1 methods

protected virtual Sandbox.Bitmap CreateAssetTypeIcon(int width, int height)PROTECTEDVIRTUAL

ParameterTypeDescription
widthint
heightint
Returns:Bitmap

Properties18

Showing 18 properties

public bool Sandbox.SoundEvent.AirAbsorption { get; set; }PUBLICGETSET

Allow this sound to be absorbed by air

Returns:bool

public int Sandbox.SoundEvent.Decibels { get; set; }PUBLICGETSETOBSOLETE

How loud is this sound, affects how far away it can be heard

Obsolete: This is not used anymore

Returns:int

public Sandbox.Audio.MixerHandle Sandbox.SoundEvent.DefaultMixer { get; set; }PUBLICGETSET

Default mixer to play this sound with if one isn't provided on play.

Returns:MixerHandle

public float Sandbox.SoundEvent.Distance { get; set; }PUBLICGETSET

How many units the sound can be heard from.

Returns:float

public bool Sandbox.SoundEvent.DistanceAttenuation { get; set; }PUBLICGETSET

Should the sound fade out over distance

Returns:bool

public Sandbox.Curve Sandbox.SoundEvent.Falloff { get; set; }PUBLICGETSET

The falloff curve for the sound.

Returns:Curve

public bool Sandbox.SoundEvent.Occlusion { get; set; }PUBLICGETSETOBSOLETE

Legacy alias for `Sandbox.SoundEvent.OcclusionEnabled`.

Obsolete: Use OcclusionEnabled instead.

Returns:bool

public bool Sandbox.SoundEvent.OcclusionEnabled { get; set; }PUBLICGETSET

Allow this sound to be occluded by geometry

Returns:bool

public float Sandbox.SoundEvent.OcclusionRadius { get; set; }PUBLICGETSETOBSOLETE

Legacy occlusion radius. No longer used by the simulation.

Obsolete: OcclusionRadius is no longer used by the simulation.

Returns:float

public RangedFloat Sandbox.SoundEvent.Pitch { get; set; }PUBLICGETSET

The base pitch of the sound.

Returns:RangedFloat

public bool Sandbox.SoundEvent.Reflections { get; set; }PUBLICGETSETOBSOLETE

Legacy alias for `Sandbox.SoundEvent.ReverbEnabled`.

Obsolete: Use ReverbEnabled instead.

Returns:bool

public virtual int Sandbox.SoundEvent.ResourceVersion { get; set; }PUBLICVIRTUALGETSET

Returns:int

public bool Sandbox.SoundEvent.ReverbEnabled { get; set; }PUBLICGETSET

Allow this sound to trace reflections, allowing it to be heard indirectly

Returns:bool

public Sandbox.SoundEvent.SoundSelectionMode Sandbox.SoundEvent.SelectionMode { get; set; }PUBLICGETSET

Selection strategy to use when picking from multiple sounds.

public System.Collections.Generic.List`1<Sandbox.SoundFile> Sandbox.SoundEvent.Sounds { get; set; }PUBLICGETSET

A random sound from the list will be selected to be played.

Returns:List<SoundFile>

public bool Sandbox.SoundEvent.Transmission { get; set; }PUBLICGETSETOBSOLETE

Legacy transmission toggle. Transmission is now derived from occlusion and material response.

Obsolete: Transmission is derived from occlusion and material response.

Returns:bool

public bool Sandbox.SoundEvent.UI { get; set; }PUBLICGETSET

Is this sound 2D?

Returns:bool

public RangedFloat Sandbox.SoundEvent.Volume { get; set; }PUBLICGETSET

How loud the sound should be.

Returns:RangedFloat

On this page