API Reference › Sounds
SoundEvent
ClassNamespace: SwiftlyS2.Shared.Sounds · Assembly: SwiftlyS2.CS2.dll
public class SoundEvent : IDisposableInherits object
Implements IDisposable
Constructors
Properties
The recipients of the sound event.
public ref CRecipientFilter Recipients { get; }Property Value
The index of the entity that this sound event is emitted from. Setting to -1 (default) will emit the sound from the recipient location.
public int SourceEntityIndex { get; set; }Property Value
Methods
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()Emit the sound event. Thread unsafe, use async variant instead for non-main thread context. The emitted sound event guid.
[ThreadUnsafe]
public uint Emit()Returns
Emit the sound event asynchronously.
public Task<uint> EmitAsync()public void SetBool(string fieldName, bool value)public void SetFloat(string fieldName, float value)public void SetFloat3(string fieldName, float x, float y, float z)public void SetFloat3(string fieldName, Vector vec)public void SetInt32(string fieldName, int value)public void SetSourceEntity(CEntityInstance entity)Parameters
- entityCEntityInstance