Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
SCR_SoundManagerEntity Interface Reference

SCR_SoundManagerEntity is created for playing simple one-shot sounds without need of SoundComponent on given entity. More...

Inheritance diagram for SCR_SoundManagerEntity:
[legend]

Public Member Functions

SCR_AudioSource CreateAudioSource (IEntity owner, string eventName)
 When creating AudioSource, basic distance and loudness check is performed to establish, if sound would be audible or not Use when having SCR_SoundDataComponent on the owner EntityID.
 
SCR_AudioSource CreateAudioSource (IEntity owner, SCR_AudioSourceConfiguration audioSourceConfiguration)
 When creating AudioSource, basic distance and loudness check is performed to establish, if sound would be audible or not Use, when need to create custom audioSourceConfiguration.
 
void CreateAndPlayAudioSource (IEntity owner, string eventName)
 Creates and plays audiosource Use when having SCR_SoundDataComponent on the owner EntityID.
 
void CreateAndPlayAudioSource (IEntity owner, SCR_AudioSourceConfiguration audioSourceConfiguration)
 Creates and plays audiosource Use when having custom AudioSourceConfiguration.
 
void CreateAndPlayAudioSource (IEntity owner, SCR_AudioSourceConfiguration audioSourceConfiguration, vector mat[4])
 Creates and plays audiosource at given location Does not allow dynamic position update Use when having custom AudioSourceConfiguration and custom transformation matrix.
 
void PlayAudioSource (SCR_AudioSource audioSource)
 Plays audiosource AudioSource playback follows after AudioSource creation and signals setup (optional) Use for sounds, when sound is linked to owner entity position.
 
void PlayAudioSource (SCR_AudioSource audioSource, vector mat[4])
 Plays audiosource using custom transformation matrix.
 
void TerminateAudioSource (IEntity entity)
 Terminates all playing sounds on given entity.
 
void TerminateAudioSource (SCR_AudioSource audioSource)
 Terminates given audio source.
 
void TerminateAll ()
 Terminates all playing sounds that are not static.
 
int GetGInteriorSignalIdx ()
 Returns GInterior global signal index.
 
int GetGCurrVehicleCoverageSignalIdx ()
 Returns GCurrVehicleCoverage global signal index.
 
int GetGIsThirdPersonCamSignalIdx ()
 Returns GIsThirdPersonCam global signal index.
 
int GetRoomSizeIdx ()
 Returns GRoomSize global signal index.
 
override void EOnPostFrame (IEntity owner, float timeSlice)
 
override void EOnInit (IEntity owner)
 
void SCR_SoundManagerEntity (IEntitySource src, IEntity parent)
 
void ~SCR_SoundManagerEntity ()
 

Static Public Attributes

static const string G_INTERIOR_SIGNAL_NAME = "GInterior"
 Global signal names.
 
static const string G_CURR_VEHICLE_COVERAGE_SIGNAL_NAME = "GCurrVehicleCoverage"
 
static const string G_IS_THIRD_PERSON_CAM_SIGNAL_NAME = "GIsThirdPersonCam"
 
static const string G_ROOM_SIZE = "GRoomSize"
 
static const string DYNAMIC_RANGE_SIGNAL_NAME = "DynamicRange"
 
static const string G_TINNITUS_SIGNAL_NAME = "GTinnitus"
 
static const string IN_EDITOR_SIGNAL_NAME = "InEditor"
 

Protected Member Functions

void SetDynamicRangeSignalValue ()
 Sets GDynamicRange signal value based on game settings.
 
void SetTinnitusSignalValue ()
 Sets EnableTinnitus signal value based on game settings.
 
void OnEditorOpen ()
 Sets InEditor signal to 1.
 
void OnEditorClose ()
 Sets InEditor signal to 0.
 
void OnEditorManagerInit (SCR_EditorManagerEntity editorManager)
 Registers to open and close editor event listenets.
 
void OnEditorManagerExit (SCR_EditorManagerEntity editorManager)
 Unregisters from open and close editor event listenets.
 
void EditorManagerEventsInit ()
 Editor manager events init.
 
void EditorManagerEventsExit ()
 Editor manager events exit.
 

Detailed Description

SCR_SoundManagerEntity is created for playing simple one-shot sounds without need of SoundComponent on given entity.

SCR_SoundManagerEntity is not present on console app. If functions in SCR_SoundManagerEntity are enough for given sound, prioritize it befor adding SoundComponent on the entity. If entity already has SoundComponent because of some other sound, do not use SCR_SoundManagerEntity. Do not use SCR_SoundManagerEntity for UI sounds. Do not use SCR_SoundManagerEntity for managing looped sounds. Looped sounds always need SoundComponent to work properly Signals for given sound can be set only befor the playback and is not possible to update them during the sound playback.

Constructor & Destructor Documentation

◆ SCR_SoundManagerEntity()

void SCR_SoundManagerEntity.SCR_SoundManagerEntity ( IEntitySource  src,
IEntity  parent 
)

◆ ~SCR_SoundManagerEntity()

void SCR_SoundManagerEntity.~SCR_SoundManagerEntity ( )

Member Function Documentation

◆ CreateAndPlayAudioSource() [1/3]

void SCR_SoundManagerEntity.CreateAndPlayAudioSource ( IEntity  owner,
SCR_AudioSourceConfiguration  audioSourceConfiguration 
)

Creates and plays audiosource Use when having custom AudioSourceConfiguration.

Parameters
ownerEntity soundEvent is linked to
audioSourceConfigurationCustom audio source configuration

◆ CreateAndPlayAudioSource() [2/3]

void SCR_SoundManagerEntity.CreateAndPlayAudioSource ( IEntity  owner,
SCR_AudioSourceConfiguration  audioSourceConfiguration,
vector  mat[4] 
)

Creates and plays audiosource at given location Does not allow dynamic position update Use when having custom AudioSourceConfiguration and custom transformation matrix.

Parameters
ownerEntity soundEvent is linked to
audioSourceConfigurationCustom audio source configuration
matSound will be played using this transformation matrix. Owner entity position is ignored

◆ CreateAndPlayAudioSource() [3/3]

void SCR_SoundManagerEntity.CreateAndPlayAudioSource ( IEntity  owner,
string  eventName 
)

Creates and plays audiosource Use when having SCR_SoundDataComponent on the owner EntityID.

Parameters
ownerEntity soundEvent is linked to
eventNameSound event that will be played

◆ CreateAudioSource() [1/2]

SCR_AudioSource SCR_SoundManagerEntity.CreateAudioSource ( IEntity  owner,
SCR_AudioSourceConfiguration  audioSourceConfiguration 
)

When creating AudioSource, basic distance and loudness check is performed to establish, if sound would be audible or not Use, when need to create custom audioSourceConfiguration.

Parameters
ownerEntity soundEvent is linked to
audioSourceConfigurationCustom audio source configuration

◆ CreateAudioSource() [2/2]

SCR_AudioSource SCR_SoundManagerEntity.CreateAudioSource ( IEntity  owner,
string  eventName 
)

When creating AudioSource, basic distance and loudness check is performed to establish, if sound would be audible or not Use when having SCR_SoundDataComponent on the owner EntityID.

Parameters
ownerEntity soundEvent is linked to
eventNameSound event to play

◆ EditorManagerEventsExit()

void SCR_SoundManagerEntity.EditorManagerEventsExit ( )
protected

Editor manager events exit.

◆ EditorManagerEventsInit()

void SCR_SoundManagerEntity.EditorManagerEventsInit ( )
protected

Editor manager events init.

◆ EOnInit()

override void SCR_SoundManagerEntity.EOnInit ( IEntity  owner)

◆ EOnPostFrame()

override void SCR_SoundManagerEntity.EOnPostFrame ( IEntity  owner,
float  timeSlice 
)

◆ GetGCurrVehicleCoverageSignalIdx()

int SCR_SoundManagerEntity.GetGCurrVehicleCoverageSignalIdx ( )

Returns GCurrVehicleCoverage global signal index.

◆ GetGInteriorSignalIdx()

int SCR_SoundManagerEntity.GetGInteriorSignalIdx ( )

Returns GInterior global signal index.

◆ GetGIsThirdPersonCamSignalIdx()

int SCR_SoundManagerEntity.GetGIsThirdPersonCamSignalIdx ( )

Returns GIsThirdPersonCam global signal index.

◆ GetRoomSizeIdx()

int SCR_SoundManagerEntity.GetRoomSizeIdx ( )

Returns GRoomSize global signal index.

◆ OnEditorClose()

void SCR_SoundManagerEntity.OnEditorClose ( )
protected

Sets InEditor signal to 0.

◆ OnEditorManagerExit()

void SCR_SoundManagerEntity.OnEditorManagerExit ( SCR_EditorManagerEntity  editorManager)
protected

Unregisters from open and close editor event listenets.

◆ OnEditorManagerInit()

void SCR_SoundManagerEntity.OnEditorManagerInit ( SCR_EditorManagerEntity  editorManager)
protected

Registers to open and close editor event listenets.

◆ OnEditorOpen()

void SCR_SoundManagerEntity.OnEditorOpen ( )
protected

Sets InEditor signal to 1.

◆ PlayAudioSource() [1/2]

void SCR_SoundManagerEntity.PlayAudioSource ( SCR_AudioSource  audioSource)

Plays audiosource AudioSource playback follows after AudioSource creation and signals setup (optional) Use for sounds, when sound is linked to owner entity position.

Parameters
audioSourceAudioSource that is supposed to be played

◆ PlayAudioSource() [2/2]

void SCR_SoundManagerEntity.PlayAudioSource ( SCR_AudioSource  audioSource,
vector  mat[4] 
)

Plays audiosource using custom transformation matrix.

Does not allow dynamic position update AudioSource playback follows after AudioSource creation and signals setup (optional)

Parameters
audioSourceAudioSource that is supposed to be played
matSound will be played using this transformation matrix. Owner entity position is ignored

◆ SetDynamicRangeSignalValue()

void SCR_SoundManagerEntity.SetDynamicRangeSignalValue ( )
protected

Sets GDynamicRange signal value based on game settings.

◆ SetTinnitusSignalValue()

void SCR_SoundManagerEntity.SetTinnitusSignalValue ( )
protected

Sets EnableTinnitus signal value based on game settings.

◆ TerminateAll()

void SCR_SoundManagerEntity.TerminateAll ( )

Terminates all playing sounds that are not static.

◆ TerminateAudioSource() [1/2]

void SCR_SoundManagerEntity.TerminateAudioSource ( IEntity  entity)

Terminates all playing sounds on given entity.

Parameters
entityAll sound events on this entity are terminated

◆ TerminateAudioSource() [2/2]

void SCR_SoundManagerEntity.TerminateAudioSource ( SCR_AudioSource  audioSource)

Terminates given audio source.

Parameters
audioSourceAudioSource to terminate

Member Data Documentation

◆ DYNAMIC_RANGE_SIGNAL_NAME

const string SCR_SoundManagerEntity.DYNAMIC_RANGE_SIGNAL_NAME = "DynamicRange"
static

◆ G_CURR_VEHICLE_COVERAGE_SIGNAL_NAME

const string SCR_SoundManagerEntity.G_CURR_VEHICLE_COVERAGE_SIGNAL_NAME = "GCurrVehicleCoverage"
static

◆ G_INTERIOR_SIGNAL_NAME

const string SCR_SoundManagerEntity.G_INTERIOR_SIGNAL_NAME = "GInterior"
static

Global signal names.

◆ G_IS_THIRD_PERSON_CAM_SIGNAL_NAME

const string SCR_SoundManagerEntity.G_IS_THIRD_PERSON_CAM_SIGNAL_NAME = "GIsThirdPersonCam"
static

◆ G_ROOM_SIZE

const string SCR_SoundManagerEntity.G_ROOM_SIZE = "GRoomSize"
static

◆ G_TINNITUS_SIGNAL_NAME

const string SCR_SoundManagerEntity.G_TINNITUS_SIGNAL_NAME = "GTinnitus"
static

◆ IN_EDITOR_SIGNAL_NAME

const string SCR_SoundManagerEntity.IN_EDITOR_SIGNAL_NAME = "InEditor"
static

The documentation for this interface was generated from the following file: