30 if (!m_sVoiceOverDataConfig || m_sVoiceOverDataConfig.IsEmpty())
33 if (!scenarioFrameworkSystem)
36 m_sVoiceOverDataConfig = scenarioFrameworkSystem.m_sVoiceOverDataConfig;
38 if (!m_sVoiceOverDataConfig || m_sVoiceOverDataConfig.IsEmpty())
46 if (!gamemode || (!m_bAllowPlayingInGameOver && !gamemode.
IsRunning()))
54 array<IEntity> entities = {};
57 SCR_ScenarioFrameworkParam<array<IEntity>> entityArrayWrapper = SCR_ScenarioFrameworkParam<array<IEntity>>.Cast(m_PlayerGetter.Get());
58 if (entityArrayWrapper)
60 entities = entityArrayWrapper.GetValue();
61 if (!entities || entities.IsEmpty())
66 SCR_ScenarioFrameworkParam<IEntity> entityWrapper = SCR_ScenarioFrameworkParam<IEntity>.Cast(m_PlayerGetter.Get());
70 Print(
string.Format(
"ScenarioFramework Action: Issue with Getter detected for Action %1 attached on %2.",
this,
object.
GetName()),
LogLevel.ERROR);
72 Print(
string.Format(
"ScenarioFramework Action: Issue with Getter detected for Action %1.",
this),
LogLevel.ERROR);
77 IEntity playerEntity = entityWrapper.GetValue();
79 entities.Insert(playerEntity);
83 array<IEntity> actorEntities = {};
86 SCR_ScenarioFrameworkParam<array<IEntity>> entityArrayWrapper = SCR_ScenarioFrameworkParam<array<IEntity>>.Cast(m_ActorGetter.Get());
87 if (entityArrayWrapper)
89 actorEntities = entityArrayWrapper.GetValue();
90 if (!actorEntities || actorEntities.IsEmpty())
95 SCR_ScenarioFrameworkParam<IEntity> entityWrapper = SCR_ScenarioFrameworkParam<IEntity>.Cast(m_ActorGetter.Get());
99 Print(
string.Format(
"ScenarioFramework Action: Issue with Getter detected for Action %1 attached on %2.",
this,
object.
GetName()),
LogLevel.ERROR);
101 Print(
string.Format(
"ScenarioFramework Action: Issue with Getter detected for Action %1.",
this),
LogLevel.ERROR);
106 IEntity playerEntity = entityWrapper.GetValue();
108 actorEntities.Insert(playerEntity);
112 array<int> playerIDs = {};
113 foreach(
IEntity possiblePlayerEntity : entities)
116 playerIDs.Insert(playerManager.GetPlayerIdFromControlledEntity(possiblePlayerEntity))
120 if (!voiceoverSystem)
123 voiceoverSystem.
SetData(m_sVoiceOverDataConfig);
132 foreach (
IEntity actor : actorEntities)
135 PrintFormat(
"ScenarioFramework Action %1 detected %2 without RplComponent thus VO won't work!",
object, actor);
138 voiceoverSystem.
PlaySequenceFor(m_sSequenceName, actorEntities, playerIDs, m_bPlayImmediately);