Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_SoundManagerModule Interface Reference

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

Inheritance diagram for SCR_SoundManagerModule:

Public Member Functions

SCR_AudioSource CreateAudioSource (notnull 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 entity.
 
SCR_AudioSource CreateAudioSource (notnull 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 you have custom audioSourceConfiguration.
 
SCR_AudioSource CreateAudioSource (notnull IEntity owner, SCR_AudioSourceConfiguration audioSourceConfiguration, vector worldPosition)
 When creating AudioSource, basic distance and loudness check is performed to establish, if sound would be audible or not Use, when you have custom audioSourceConfiguration Use, when you need define custom position offset.
 
SCR_AudioSource CreateAudioSource (SCR_AudioSourceConfiguration audioSourceConfiguration, vector worldPosition)
 When creating AudioSource, basic distance and loudness check is performed to establish, if sound would be audible or not Use, when there is no owner entity for audio source.
 
void PlayAudioSource (notnull 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 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.
 
override void OnUpdate (float timeslice)
 
override void OnInit ()
 
void SCR_SoundManagerModule (IEntitySource src, IEntity parent)
 
void ~SCR_SoundManagerModule ()
 

Static Public Member Functions

static void CreateAndPlayAudioSource (notnull IEntity owner, string eventName)
 Creates and plays audiosource Use when having SCR_SoundDataComponent on the owner EntityID.
 
static void CreateAndPlayAudioSource (notnull IEntity owner, SCR_AudioSourceConfiguration audioSourceConfiguration)
 Creates and plays audiosource Use when having custom AudioSourceConfiguration.
 
static SCR_SoundManagerModule GetInstance (World world)
 

Static Public Attributes

static const string DYNAMIC_RANGE_SIGNAL_NAME = "DynamicRange"
 Global signal names.
 
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_SoundManagerModule is created for playing simple one-shot sounds without need of SoundComponent on given entity.

SCR_SoundManagerModule is not present on console app. If functions in SCR_SoundManagerModule 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_SoundManagerModule. Do not use SCR_SoundManagerModule for UI sounds. Do not use SCR_SoundManagerModule for managing looped sounds. Looped sounds always need SoundComponent to work properly Signals for given sound can be set only before the playback and is not possible to update them during the sound playback.

Constructor & Destructor Documentation

◆ SCR_SoundManagerModule()

void SCR_SoundManagerModule.SCR_SoundManagerModule ( IEntitySource src,
IEntity parent )

◆ ~SCR_SoundManagerModule()

void SCR_SoundManagerModule.~SCR_SoundManagerModule ( )

Member Function Documentation

◆ CreateAndPlayAudioSource() [1/2]

static void SCR_SoundManagerModule.CreateAndPlayAudioSource ( notnull IEntity owner,
SCR_AudioSourceConfiguration audioSourceConfiguration )
static

Creates and plays audiosource Use when having custom AudioSourceConfiguration.

Parameters
ownerEntity soundEvent is linked to
audioSourceConfigurationCustom audio source configuration

◆ CreateAndPlayAudioSource() [2/2]

static void SCR_SoundManagerModule.CreateAndPlayAudioSource ( notnull IEntity owner,
string eventName )
static

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/4]

SCR_AudioSource SCR_SoundManagerModule.CreateAudioSource ( notnull 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 you have custom audioSourceConfiguration.

Parameters
ownerEntity soundEvent is linked to
audioSourceConfigurationCustom audio source configuration

◆ CreateAudioSource() [2/4]

SCR_AudioSource SCR_SoundManagerModule.CreateAudioSource ( notnull IEntity owner,
SCR_AudioSourceConfiguration audioSourceConfiguration,
vector worldPosition )

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

Parameters
ownerEntity soundEvent is linked to
audioSourceConfigurationCustom audio source configuration
worldPositionPosition in world space sound will be triggered at

◆ CreateAudioSource() [3/4]

SCR_AudioSource SCR_SoundManagerModule.CreateAudioSource ( notnull 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 entity.

Parameters
ownerEntity soundEvent is linked to
eventNameis sound event to play

◆ CreateAudioSource() [4/4]

SCR_AudioSource SCR_SoundManagerModule.CreateAudioSource ( SCR_AudioSourceConfiguration audioSourceConfiguration,
vector worldPosition )

When creating AudioSource, basic distance and loudness check is performed to establish, if sound would be audible or not Use, when there is no owner entity for audio source.

Parameters
audioSourceConfigurationCustom audio source configuration
worldPositionPosition in world space sound will play from

◆ EditorManagerEventsExit()

void SCR_SoundManagerModule.EditorManagerEventsExit ( )
protected

Editor manager events exit.

◆ EditorManagerEventsInit()

void SCR_SoundManagerModule.EditorManagerEventsInit ( )
protected

Editor manager events init.

◆ GetInstance()

static SCR_SoundManagerModule SCR_SoundManagerModule.GetInstance ( World world)
static
Parameters
[in]worldto search SCR_SoundManagerModule in
Returns
instance of SCR_SoundManagerModule

◆ OnEditorClose()

void SCR_SoundManagerModule.OnEditorClose ( )
protected

Sets InEditor signal to 0.

◆ OnEditorManagerExit()

void SCR_SoundManagerModule.OnEditorManagerExit ( SCR_EditorManagerEntity editorManager)
protected

Unregisters from open and close editor event listenets.

◆ OnEditorManagerInit()

void SCR_SoundManagerModule.OnEditorManagerInit ( SCR_EditorManagerEntity editorManager)
protected

Registers to open and close editor event listenets.

◆ OnEditorOpen()

void SCR_SoundManagerModule.OnEditorOpen ( )
protected

Sets InEditor signal to 1.

◆ OnInit()

override void SCR_SoundManagerModule.OnInit ( )

◆ OnUpdate()

override void SCR_SoundManagerModule.OnUpdate ( float timeslice)

◆ PlayAudioSource()

void SCR_SoundManagerModule.PlayAudioSource ( notnull 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

◆ SetDynamicRangeSignalValue()

void SCR_SoundManagerModule.SetDynamicRangeSignalValue ( )
protected

Sets GDynamicRange signal value based on game settings.

◆ SetTinnitusSignalValue()

void SCR_SoundManagerModule.SetTinnitusSignalValue ( )
protected

Sets EnableTinnitus signal value based on game settings.

◆ TerminateAll()

void SCR_SoundManagerModule.TerminateAll ( )

Terminates all playing sounds that are not static.

◆ TerminateAudioSource() [1/2]

void SCR_SoundManagerModule.TerminateAudioSource ( IEntity entity)

Terminates all playing sounds on given entity.

Parameters
entityAll sound events on this entity are terminated

◆ TerminateAudioSource() [2/2]

void SCR_SoundManagerModule.TerminateAudioSource ( SCR_AudioSource audioSource)

Terminates given audio source.

Parameters
audioSourceAudioSource to terminate

Member Data Documentation

◆ DYNAMIC_RANGE_SIGNAL_NAME

const string SCR_SoundManagerModule.DYNAMIC_RANGE_SIGNAL_NAME = "DynamicRange"
static

Global signal names.

◆ G_TINNITUS_SIGNAL_NAME

const string SCR_SoundManagerModule.G_TINNITUS_SIGNAL_NAME = "GTinnitus"
static

◆ IN_EDITOR_SIGNAL_NAME

const string SCR_SoundManagerModule.IN_EDITOR_SIGNAL_NAME = "InEditor"
static

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