Arma Reforger Script API
|
Public Member Functions | |
override bool | ShouldBePaused () |
Is this system should be paused while the simulation is paused? | |
ScriptInvokerVoid | GetOnFinished () |
Triggered when a line or sequence finishes playing. | |
ScriptInvokerString | GetOnFinishedEvent () |
Triggered when an event finishes playing. | |
void | SetData (ResourceName config) |
Loads voiceover data from the given SCR_VoiceoverData config resource Must be called before PlaySequence or PlayLine which both use data from this config! | |
bool | IsPlaying () |
void | SetActorName (SCR_EVoiceoverActor actor, string name) |
Actor name associated with the given enum will be shown in the subtitle. | |
void | ClearActorNames () |
void | PlaySequence (string sequenceName, IEntity actor1=null, IEntity actor2=null, IEntity actor3=null, IEntity actor4=null, IEntity actor5=null, bool playImmediately=true) |
Plays a sequence of voiceover lines defined in loaded config (see SetData) | |
void | PlaySequenceActorsArray (string sequenceName, notnull array< IEntity > actors, bool playImmediately=true) |
Same as PlaySequence but accepts an array of actors. | |
void | PlaySequenceGlobal (string sequenceName, notnull array< IEntity > actors, bool playImmediately=true) |
Same as PlaySequence but plays the VO for all clients. Has to be executed on server. | |
void | PlaySequenceFor (string sequenceName, notnull array< IEntity > actors, notnull array< int > targetPlayerIds, bool playImmediately=true) |
Same as PlaySequenceGlobal but plays the VO for clients defined by player IDs. | |
void | PlayLine (string lineName, IEntity actor=null, bool playImmediately=true) |
Plays a voiceover line defined in loaded config (see SetData) | |
void | PlayLineGlobal (string lineName, notnull IEntity actor, bool playImmediately=true) |
Same as PlayLine but plays the VO for all clients. Has to be executed on server. | |
void | PlayLineFor (string lineName, notnull IEntity actor, notnull array< int > targetPlayerIds, bool playImmediately=true) |
Same as PlayLineGlobal but plays the VO for clients defined by player IDs. | |
void | PlayCustomLine (string soundEventName, string subtitle, IEntity actor=null, string actorName=string.Empty, bool playImmediately=true) |
Plays a custom voiceover line. | |
void | Stop () |
void | RegisterActor (notnull IEntity entity) |
Registers an actor so subtitles can be shown when a voiceover is not played from the voiceover system (like from animations etc.) Needs to be called before the sound event is played Voiceover data with subtitles still has to be set properly with corresponding sound event. | |
void | ~SCR_VoiceoverSystem () |
Public Member Functions inherited from GameSystem | |
bool | ShouldBePaused () |
Is this system should be paused while the simulation is paused? | |
bool | ShouldBeEnabledInEditMode () |
Is this system should be enabled inside the editor. | |
Static Public Member Functions | |
static SCR_VoiceoverSystem | GetInstance () |
Protected Member Functions | |
override void | OnStarted () |
override void | OnStopped () |
override void | OnUpdate (ESystemPoint point) |
void | OnControllableDestroyed (notnull SCR_InstigatorContextData instigatorContextData) |
Stop the voiceover when the speaker dies. | |
void | OnControllableDeleted (IEntity entity) |
Stop the voiceover when the speaker is deleted. | |
void | OnActorLifeStateChanged () |
Stop the voiceover when the speaker becomes unconscious. | |
void | AddActorUnconsciousCheck (notnull IEntity actor) |
void | RemoveActorUnconsciousCheck (notnull IEntity actor) |
void | RpcDo_PlaySequence (string dataName, string sequenceName, array< RplId > actorIds, bool playImmediately) |
void | RpcDo_PlaySequenceFor (string dataName, string sequenceName, array< RplId > actorIds, array< int > targetPlayerIds, bool playImmediately) |
void | RpcDo_PlayLine (string dataName, string lineName, RplId actorId, bool playImmediately) |
void | RpcDo_PlayLineFor (string dataName, string lineName, RplId actorId, array< int > targetPlayerIds, bool playImmediately) |
void | PlayFromQueue () |
void | PlayLineActual (string eventName, string subtitle, IEntity actor=null, string actorName=string.Empty) |
void | OnSoundEventStarted (SCR_CommunicationSoundComponent component, string eventName, AudioHandle handle, int priority) |
void | OnSoundEventFinished (SCR_CommunicationSoundComponent component, string eventName, AudioHandle handle, int priority, bool terminated) |
void | ShowSubtitle (string subtitle, string actorName, string eventName) |
void | FailsafeSubtitleToggle (string eventName) |
IEntity | GetDefaultActor () |
void | OnFinished (string eventName=string.Empty, bool hideSubtitles=true) |
Protected Attributes | |
ResourceName | m_sDataResourceName |
ref ScriptInvokerVoid | m_OnFinished |
ref ScriptInvokerString | m_OnFinishedEvent |
ref SCR_VoiceoverData | m_Data |
ref SCR_VoiceoverSubtitles | m_SubtitlesDisplay |
ref array< ref SCR_VoiceoverLine > | m_aQueue = {} |
ref array< IEntity > | m_aActors = {} |
ref array< SCR_CommunicationSoundComponent > | m_aHandledComponents = {} |
ref map< SCR_EVoiceoverActor, string > | m_mActorNames = new map<SCR_EVoiceoverActor, string>() |
SCR_CommunicationSoundComponent | m_PlayingSoundComponent |
AudioHandle | m_iAudioHandle |
float | m_fTimer |
string | m_sSubtitleEvent |
Static Protected Attributes | |
static const float | PAUSE_BETWEEN_LINES = 0.5 |
static const int | SUBTITLE_VISIBILITY_DISTANCE_SQ = 30 * 30 |
static const int | SUBTITLE_FAILSAFE_TOGGLE_DELAY_MS = 15000 |
void SCR_VoiceoverSystem.~SCR_VoiceoverSystem | ( | ) |
|
protected |
void SCR_VoiceoverSystem.ClearActorNames | ( | ) |
|
protected |
|
protected |
|
static |
ScriptInvokerVoid SCR_VoiceoverSystem.GetOnFinished | ( | ) |
Triggered when a line or sequence finishes playing.
ScriptInvokerString SCR_VoiceoverSystem.GetOnFinishedEvent | ( | ) |
Triggered when an event finishes playing.
bool SCR_VoiceoverSystem.IsPlaying | ( | ) |
|
protected |
Stop the voiceover when the speaker becomes unconscious.
|
protected |
Stop the voiceover when the speaker is deleted.
|
protected |
Stop the voiceover when the speaker dies.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void SCR_VoiceoverSystem.PlayCustomLine | ( | string | soundEventName, |
string | subtitle, | ||
IEntity | actor = null , |
||
string | actorName = string::Empty , |
||
bool | playImmediately = true |
||
) |
Plays a custom voiceover line.
|
protected |
void SCR_VoiceoverSystem.PlayLine | ( | string | lineName, |
IEntity | actor = null , |
||
bool | playImmediately = true |
||
) |
Plays a voiceover line defined in loaded config (see SetData)
|
protected |
void SCR_VoiceoverSystem.PlayLineFor | ( | string | lineName, |
notnull IEntity | actor, | ||
notnull array< int > | targetPlayerIds, | ||
bool | playImmediately = true |
||
) |
Same as PlayLineGlobal but plays the VO for clients defined by player IDs.
void SCR_VoiceoverSystem.PlayLineGlobal | ( | string | lineName, |
notnull IEntity | actor, | ||
bool | playImmediately = true |
||
) |
Same as PlayLine but plays the VO for all clients. Has to be executed on server.
void SCR_VoiceoverSystem.PlaySequence | ( | string | sequenceName, |
IEntity | actor1 = null , |
||
IEntity | actor2 = null , |
||
IEntity | actor3 = null , |
||
IEntity | actor4 = null , |
||
IEntity | actor5 = null , |
||
bool | playImmediately = true |
||
) |
Plays a sequence of voiceover lines defined in loaded config (see SetData)
void SCR_VoiceoverSystem.PlaySequenceActorsArray | ( | string | sequenceName, |
notnull array< IEntity > | actors, | ||
bool | playImmediately = true |
||
) |
Same as PlaySequence but accepts an array of actors.
void SCR_VoiceoverSystem.PlaySequenceFor | ( | string | sequenceName, |
notnull array< IEntity > | actors, | ||
notnull array< int > | targetPlayerIds, | ||
bool | playImmediately = true |
||
) |
Same as PlaySequenceGlobal but plays the VO for clients defined by player IDs.
void SCR_VoiceoverSystem.PlaySequenceGlobal | ( | string | sequenceName, |
notnull array< IEntity > | actors, | ||
bool | playImmediately = true |
||
) |
Same as PlaySequence but plays the VO for all clients. Has to be executed on server.
void SCR_VoiceoverSystem.RegisterActor | ( | notnull IEntity | entity | ) |
Registers an actor so subtitles can be shown when a voiceover is not played from the voiceover system (like from animations etc.) Needs to be called before the sound event is played Voiceover data with subtitles still has to be set properly with corresponding sound event.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void SCR_VoiceoverSystem.SetActorName | ( | SCR_EVoiceoverActor | actor, |
string | name | ||
) |
Actor name associated with the given enum will be shown in the subtitle.
void SCR_VoiceoverSystem.SetData | ( | ResourceName | config | ) |
Loads voiceover data from the given SCR_VoiceoverData config resource Must be called before PlaySequence or PlayLine which both use data from this config!
override bool SCR_VoiceoverSystem.ShouldBePaused | ( | ) |
Is this system should be paused while the simulation is paused?
Implements GameSystem.
|
protected |
void SCR_VoiceoverSystem.Stop | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |