swiftlys2/docs/api/releases/features/ai/
API Reference › Sounds

SoundEvent

Class
Namespace: SwiftlyS2.Shared.Sounds · Assembly: SwiftlyS2.CS2.dll
public class SoundEvent : IDisposable
Inherits object
Implements IDisposable
View source

Constructors

SoundEvent()

public SoundEvent()

SoundEvent(string, float, float)

public SoundEvent(string name, float volume = 1, float pitch = 1)
Parameters

Properties

Name

public string Name { get; set; }
Property Value

Pitch

public float Pitch { get; set; }
Property Value

Recipients

public ref CRecipientFilter Recipients { get; }
Property Value

SourceEntityIndex

public int SourceEntityIndex { get; set; }
Property Value

Volume

public float Volume { get; set; }
Property Value

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Emit()

[ThreadUnsafe]
public uint Emit()
Returns

EmitAsync()

public Task<uint> EmitAsync()
Returns

GetBool(string)

public bool GetBool(string fieldName)
Parameters
Returns

GetFloat(string)

public float GetFloat(string fieldName)
Parameters
Returns

GetFloat3(string)

public Vector GetFloat3(string fieldName)
Parameters
Returns

GetInt32(string)

public int GetInt32(string fieldName)
Parameters
Returns

GetUInt32(string)

public uint GetUInt32(string fieldName)
Parameters
Returns

SetBool(string, bool)

public void SetBool(string fieldName, bool value)
Parameters

SetFloat(string, float)

public void SetFloat(string fieldName, float value)
Parameters

SetFloat3(string, float, float, float)

public void SetFloat3(string fieldName, float x, float y, float z)
Parameters

SetFloat3(string, Vector)

public void SetFloat3(string fieldName, Vector vec)
Parameters

SetInt32(string, int)

public void SetInt32(string fieldName, int value)
Parameters

SetSourceEntity(CEntityInstance)

public void SetSourceEntity(CEntityInstance entity)
Parameters

SetUInt32(string, uint)

public void SetUInt32(string fieldName, uint value)
Parameters