Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_GameModeSFManager.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/GameMode", description: "")]
3 {
4 }
5 
6 enum SCR_ScenarioFrameworkEActivationType
7 {
8  SAME_AS_PARENT = 0,
11  ON_INIT, //when the game mode is initiated
12  ON_TASKS_INIT, //when the game mode starts creating tasks
13  CUSTOM1, //won't spawn until something will try to spawn the object with CUSTOM as parameter
14  CUSTOM2,
15  CUSTOM3,
16  CUSTOM4,
17 }
18 
19 enum SCR_ESFTaskType
20 {
21  NONE,
22  DELIVER,
23  DESTROY,
24  DEFEND,
25  KILL,
26  CLEAR_AREA,
27  LAST,
28  EXTRACTION,
29  DEFAULT
30 }
31 
32 class SCR_GameModeSFManager : SCR_BaseGameModeComponent
33 {
34  [Attribute("Available Tasks for the Scenario", category: "Tasks")];
35  protected ref array<ref SCR_ScenarioFrameworkTaskType> m_aTaskTypesAvailable;
36 
37  [Attribute( defvalue: "3", desc: "Maximal number of tasks that can be generated", category: "Tasks" )];
38  protected int m_iMaxNumberOfTasks;
39 
40  [Attribute(UIWidgets.Auto, desc: "Actions that will be activated after tasks are initialized", category: "Tasks")];
41  protected ref array<ref SCR_ScenarioFrameworkActionBase> m_aAfterTasksInitActions;
42 
43  [Attribute(desc: "List of Core Areas that are essential for the Scenario to spawn alongside Debug Areas", category: "Debug")];
44  protected ref array<string> m_aCoreAreas;
45 
46  [Attribute(desc: "List of Areas that will be spawned (Optionally with desired Layer Task) as opposed to leaving it to random generation", category: "Debug")];
47  protected ref array<ref SCR_ScenarioFrameworkDebugArea> m_aDebugAreas;
48 
49  [Attribute(desc: "Should the dynamic Spawn/Despawn based on distance from player characters be enabled for the whole GameMode?", category: "Dynamic Spawn/Despawn")];
50  protected bool m_bDynamicDespawn;
51 
52  [Attribute(defvalue: "4", UIWidgets.Slider, params: "0 600 1", desc: "How frequently is dynamic spawn/despawn being checked in seconds", category: "Dynamic Spawn/Despawn")]
53  protected int m_iUpdateRate;
54 
55  protected bool m_bMatchOver;
57 
58  protected ref ScriptInvoker m_OnAllAreasInitiated;
59  protected ref ScriptInvoker m_OnTaskStateChanged;
60 
64 
65  ref array<SCR_ScenarioFrameworkArea> m_aAreas = {};
66  ref array<SCR_ScenarioFrameworkArea> m_aSelectedAreas = {};
67  ref array<SCR_ScenarioFrameworkLayerTask> m_aLayerTasksToBeInitialized = {};
68  ref array<SCR_ScenarioFrameworkLayerTask> m_aLayerTasksForRandomization = {};
69  ref array<int> m_aIntroVoicelineIndexes = {};
70  ref array<string> m_aAreasTasksToSpawn = {};
71  ref array<string> m_aLayersTaskToSpawn = {};
72  ref array<SCR_ESFTaskType> m_aESFTaskTypesAvailable = {};
73  ref array<SCR_ESFTaskType> m_aESFTaskTypeForRandomization = {};
74 
75  protected ref array<ref Tuple3<SCR_ScenarioFrameworkArea, vector, int>> m_aSpawnedAreas = {};
76  protected ref array<ref Tuple3<SCR_ScenarioFrameworkArea, vector, int>> m_aDespawnedAreas = {};
77  protected ref array<vector> m_aObservers = {};
78 
79  //------------------------------------------------------------------------------------------------
83  [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
84  void RpcDo_PlaySoundOnEntity(EntityID pEntID, string sSndName)
85  {
86  if (!pEntID)
87  return;
88 
89  IEntity entity = GetGame().GetWorld().FindEntityByID(pEntID);
90  if (!entity)
91  return;
92 
93  SoundComponent pSndComp = SoundComponent.Cast(entity.FindComponent(SoundComponent));
94  if (!pSndComp)
95  return;
96 
97  pSndComp.SoundEvent(sSndName);
98  }
99 
100  //------------------------------------------------------------------------------------------------
104  void PlaySoundOnEntity(IEntity entity, string sSndName)
105  {
106  if (!entity)
107  entity = GetOwner(); //play it on game mode if any entity is passed
108 
109  if (!entity)
110  return;
111 
112  if (IsMaster())
113  Rpc(RpcDo_PlaySoundOnEntity, entity.GetID(), sSndName);
114 
115  RpcDo_PlaySoundOnEntity(entity.GetID(), sSndName);
116  }
117 
118  //------------------------------------------------------------------------------------------------
123  void PlayIntroVoiceline(int playerID, string eventName, EntityID entityID)
124  {
125  Rpc(RpcDo_PlayIntroVoiceline, playerID, eventName, entityID);
126  RpcDo_PlayIntroVoiceline(playerID, eventName, entityID);
127  }
128 
129  //------------------------------------------------------------------------------------------------
134  [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
135  void RpcDo_PlayIntroVoiceline(int playerID, string eventName, EntityID entityID)
136  {
137  PlayerManager playerManager = GetGame().GetPlayerManager();
138  if (!playerManager)
139  return;
140 
141  PlayerController playerController = GetGame().GetPlayerController();
142  if (!playerController)
143  return;
144 
145  if (playerID != playerController.GetPlayerId())
146  return;
147 
148  IEntity entity;
149  if (entityID)
150  {
151  entity = GetGame().GetWorld().FindEntityByID(entityID);
152  if (!entity)
153  return;
154  }
155  else
156  {
157  entity = playerManager.GetPlayerControlledEntity(playerID);
158  if (!entity)
159  return;
160  }
161 
162  SignalsManagerComponent signalComp = SignalsManagerComponent.Cast(entity.FindComponent(SignalsManagerComponent));
163  if (!signalComp)
164  return;
165 
166  if (m_aIntroVoicelineIndexes.IsEmpty())
167  {
168  signalComp.SetSignalValue(signalComp.AddOrFindSignal("PlanName"), 0);
169  }
170  else
171  {
172  int seed;
173  foreach (int index : m_aIntroVoicelineIndexes)
174  {
175  seed += index;
176  }
177 
178  Math.Randomize(seed);
179  signalComp.SetSignalValue(signalComp.AddOrFindSignal("PlanName"), Math.RandomIntInclusive(0, 2));
180  }
181 
182  int indexCount = m_aIntroVoicelineIndexes.Count();
183 
184  if (indexCount > 0)
185  signalComp.SetSignalValue(signalComp.AddOrFindSignal("Objective1"), m_aIntroVoicelineIndexes[0]);
186  else
187  signalComp.SetSignalValue(signalComp.AddOrFindSignal("Objective1"), 1);
188 
189  if (indexCount > 1)
190  signalComp.SetSignalValue(signalComp.AddOrFindSignal("Objective2"), m_aIntroVoicelineIndexes[1]);
191  else
192  signalComp.SetSignalValue(signalComp.AddOrFindSignal("Objective2"), 2);
193 
194  if (indexCount > 2)
195  signalComp.SetSignalValue(signalComp.AddOrFindSignal("Objective3"), m_aIntroVoicelineIndexes[2]);
196  else
197  signalComp.SetSignalValue(signalComp.AddOrFindSignal("Objective3"), 3);
198 
199  if (indexCount > 3)
200  signalComp.SetSignalValue(signalComp.AddOrFindSignal("Objective4"), m_aIntroVoicelineIndexes[3]);
201  else
202  signalComp.SetSignalValue(signalComp.AddOrFindSignal("Objective4"), 4);
203 
204  if (indexCount > 4)
205  signalComp.SetSignalValue(signalComp.AddOrFindSignal("Objective5"), m_aIntroVoicelineIndexes[4]);
206  else
207  signalComp.SetSignalValue(signalComp.AddOrFindSignal("Objective5"), 5);
208 
209  if (indexCount > 5)
210  signalComp.SetSignalValue(signalComp.AddOrFindSignal("Objective6"), m_aIntroVoicelineIndexes[5]);
211  else
212  signalComp.SetSignalValue(signalComp.AddOrFindSignal("Objective6"), 6);
213 
214  SoundComponent soundComp = SoundComponent.Cast(entity.FindComponent(SoundComponent));
215  if (!soundComp)
216  return;
217 
218  soundComp.SoundEvent(eventName);
219  }
220 
221  //------------------------------------------------------------------------------------------------
225  [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
226  void RpcDo_PlaySoundOnEntityPosition(RplId objectID, string soundFile, string soundEventName)
227  {
228  IEntity object = IEntity.Cast(Replication.FindItem(objectID));
229  if(!object)
230  return;
231 
232  SCR_SoundManagerEntity soundManagerEntity = GetGame().GetSoundManagerEntity();
233  if (!soundManagerEntity)
234  return;
235 
236  SCR_AudioSourceConfiguration audioConfig = new SCR_AudioSourceConfiguration();
237  audioConfig.m_sSoundProject = soundFile;
238  audioConfig.m_sSoundEventName = soundEventName;
239  audioConfig.m_eFlags = EAudioSourceConfigurationFlag.FinishWhenEntityDestroyed;
240  soundManagerEntity.CreateAndPlayAudioSource(object, audioConfig);
241  }
242 
243  //------------------------------------------------------------------------------------------------
248  void PlaySoundOnEntityPosition(IEntity object, string soundFile, string soundEventName)
249  {
250  RplId objectID = Replication.FindId(object);
251  if (!objectID.IsValid())
252  return;
253 
254  if (SCR_StringHelper.IsEmptyOrWhiteSpace(soundFile))
255  return;
256 
257  if (SCR_StringHelper.IsEmptyOrWhiteSpace(soundEventName))
258  return;
259 
260  if (IsMaster())
261  Rpc(RpcDo_PlaySoundOnEntityPosition, objectID, soundFile, soundEventName);
262 
263  RpcDo_PlaySoundOnEntityPosition(objectID, soundFile, soundEventName);
264  }
265 
266  //------------------------------------------------------------------------------------------------
269  {
270  return m_LastFinishedTask;
271  }
272 
273  //------------------------------------------------------------------------------------------------
276  {
278  }
279 
280  //------------------------------------------------------------------------------------------------
282  array<SCR_ScenarioFrameworkArea> GetAreas()
283  {
284  return m_aAreas;
285  }
286 
287  //------------------------------------------------------------------------------------------------
290  {
291  Faction faction = task.GetTargetFaction();
292  if (faction)
293  PopUpMessage(task.GetTitle(), "#AR-CampaignTasks_NewObjectivesAvailable-UC", faction.GetFactionKey());
294  else
295  PopUpMessage(task.GetTitle(), "#AR-CampaignTasks_NewObjectivesAvailable-UC");
296  }
297 
298  //------------------------------------------------------------------------------------------------
302  {
303  if (!SCR_ScenarioFrameworkTask.Cast(task))
304  return;
305 
306  Faction faction = task.GetTargetFaction();
307 
308  if (task.GetTaskState() == SCR_TaskState.FINISHED)
309  {
310  m_LastFinishedTaskLayer = SCR_ScenarioFrameworkTask.Cast(task).GetLayerTask();
311  m_LastFinishedTask = task;
312  }
313 
314  if (mask & SCR_ETaskEventMask.TASK_PROPERTY_CHANGED && !(mask & SCR_ETaskEventMask.TASK_CREATED) && !(mask & SCR_ETaskEventMask.TASK_FINISHED) && !(mask & SCR_ETaskEventMask.TASK_ASSIGNEE_CHANGED))
315  {
316  if (faction)
317  PopUpMessage(task.GetTitle(), "#AR-Workshop_ButtonUpdate", faction.GetFactionKey());
318  else
319  PopUpMessage(task.GetTitle(), "#AR-Workshop_ButtonUpdate");
320 
321  SCR_ScenarioFrameworkLayerTask taskLayer = SCR_ScenarioFrameworkTask.Cast(task).GetLayerTask();
322  SCR_ScenarioFrameworkSlotTask subject = taskLayer.GetSlotTask();
323  if (subject)
324  subject.OnTaskStateChanged(SCR_TaskState.UPDATED);
325  }
326 
327  GetOnTaskStateChanged().Invoke(task, mask);
328  }
329 
330  //------------------------------------------------------------------------------------------------
333  {
334  m_eGameOverType = GameOverType;
335  }
336 
337  //------------------------------------------------------------------------------------------------
339  void Finish()
340  {
341  SCR_GameModeEndData endData = SCR_GameModeEndData.CreateSimple(m_eGameOverType, 0,0);
342 
343  m_bMatchOver = true;
344 
345  SCR_BaseGameMode.Cast(GetOwner()).EndGameMode(endData);
346  }
347 
348  //------------------------------------------------------------------------------------------------
351  {
352  return m_bMatchOver;
353  }
354 
355  //------------------------------------------------------------------------------------------------
357  ScriptInvoker GetOnAllAreasInitiated()
358  {
360  m_OnAllAreasInitiated = new ScriptInvoker();
361 
362  return m_OnAllAreasInitiated;
363  }
364 
365  //------------------------------------------------------------------------------------------------
367  ScriptInvoker GetOnTaskStateChanged()
368  {
370  m_OnTaskStateChanged = new ScriptInvoker();
371 
372  return m_OnTaskStateChanged;
373  }
374 
375  //------------------------------------------------------------------------------------------------
380  {
381  if (m_aAreas.IsEmpty())
382  return null;
383 
384  SCR_ScenarioFrameworkArea selectedArea = null;
385  if (!m_LastFinishedTask)
386  return null;
387 
388  vector vTaskPos = m_LastFinishedTask.GetOrigin();
389  float fMinDistance = float.MAX;
390  float fDistance = 0;
391  for (int i = 0, count = m_aAreas.Count(); i < count; i++)
392  {
393  if (!m_aAreas[i].GetIsTaskSuitableForArea(eTaskType))
394  continue;
395 
396  fDistance = vector.Distance(vTaskPos, m_aAreas[i].GetOwner().GetOrigin());
397  if (fDistance < fMinDistance)
398  {
399  fMinDistance = fDistance;
400  selectedArea = m_aAreas[i];
401  }
402  }
403  return selectedArea;
404  }
405 
406 
407  //------------------------------------------------------------------------------------------------
410  bool IsMaster() // IsServer
411  {
412  RplComponent comp = RplComponent.Cast(GetOwner().FindComponent(RplComponent));
413  if (!comp)
414  return false; //by purpose - debug
415 
416  return !comp.IsProxy();
417  }
418 
419  //------------------------------------------------------------------------------------------------
423  {
424  if (m_aAreas.Find(area) == -1)
425  m_aAreas.Insert(area);
426  }
427 
428  //------------------------------------------------------------------------------------------------
429  protected void LoadHeaderSettings();
430 
431  //------------------------------------------------------------------------------------------------
432  protected bool Init()
433  {
434  if (!IsMaster())
435  return false;
436 
438 
439  if (m_aDebugAreas.IsEmpty())
440  {
441  foreach (SCR_ScenarioFrameworkArea area : m_aAreas)
442  {
443  if (area.GetDynamicDespawnEnabled())
444  continue;
445 
446  area.Init();
447  }
448  }
449  else
450  {
452  SCR_ScenarioFrameworkLayerTask layerTask;
453  foreach (SCR_ScenarioFrameworkDebugArea debugArea : m_aDebugAreas)
454  {
455  area = debugArea.GetForcedArea();
456  if (!area)
457  continue;
458 
459  if (!m_aAreasTasksToSpawn.Contains(area.GetName()))
460  m_aAreasTasksToSpawn.Insert(area.GetName());
461 
462  if (!area.GetDynamicDespawnEnabled())
463  area.Init();
464 
465  layerTask = debugArea.GetForcedLayerTask();
466  if (layerTask && !m_aLayersTaskToSpawn.Contains(layerTask.GetName()))
467  m_aLayersTaskToSpawn.Insert(layerTask.GetName());
468  }
469 
470  IEntity entity;
471  foreach (string coreArea : m_aCoreAreas)
472  {
473  if (SCR_StringHelper.IsEmptyOrWhiteSpace(coreArea))
474  continue;
475 
476  entity = GetGame().GetWorld().FindEntityByName(coreArea);
477  if (!entity)
478  continue;
479 
480  area = SCR_ScenarioFrameworkArea.Cast(entity.FindComponent(SCR_ScenarioFrameworkArea));
481  if (area && !area.GetDynamicDespawnEnabled())
482  area.Init()
483  }
484  }
485 
486  SCR_ScenarioFrameworkLayerTask.s_OnTaskSetup.Insert(OnTaskCreated);
487  SCR_BaseTaskManager.s_OnTaskUpdate.Insert(OnTaskUpdate);
488 
489  //if someone registered for the event, then call it
491  m_OnAllAreasInitiated.Invoke();
492 
493  PostInit();
494 
495  return true;
496  }
497 
498  //------------------------------------------------------------------------------------------------
499  protected void PostInit()
500  {
501  GenerateTasks();
502  }
503 
504  //------------------------------------------------------------------------------------------------
506  // Spawns random Task based on available tasks and Areas that haven't spawned any
508  {
509  // In case of more max tasks to be spawned but with less task types, we need to refill it again
510  if (m_aESFTaskTypeForRandomization.IsEmpty())
512 
513  if (m_aLayerTasksForRandomization.IsEmpty())
514  return;
515 
516  Math.Randomize(-1);
517  SCR_ScenarioFrameworkLayerTask layerTask = m_aLayerTasksForRandomization.GetRandomElement();
518  if (!layerTask)
519  return;
520 
521  // This filters out task types that were already spawned
522  SCR_ESFTaskType taskType = layerTask.GetTaskType();
523  if (!m_aESFTaskTypeForRandomization.Contains(taskType))
524  {
525  for (int i = m_aLayerTasksForRandomization.Count() - 1; i >= 0; i--)
526  {
527  if (m_aLayerTasksForRandomization[i].GetTaskType() == taskType)
529  }
530 
531  if (m_aESFTaskTypesAvailable.Contains(taskType))
532  SpawnRandomTask();
533  }
534  m_aESFTaskTypeForRandomization.RemoveItem(taskType);
535 
536  //Spawning and setting necessary states
537  SCR_ScenarioFrameworkArea area = layerTask.GetParentArea();
538  m_aLayerTasksToBeInitialized.Insert(layerTask);
539  layerTask.SetParentLayer(layerTask.GetParentLayer());
540  layerTask.Init(area, SCR_ScenarioFrameworkEActivationType.ON_TASKS_INIT);
541  area.SetLayerTask(layerTask);
542  area.SetAreaSelected(true);
543  m_aSelectedAreas.Insert(area);
544 
545  // Removing all Layer Tasks that have the same Task Type
546  for (int i = m_aLayerTasksForRandomization.Count() - 1; i >= 0; i--)
547  {
548  if (m_aLayerTasksForRandomization[i].GetTaskType() == taskType)
550  }
551 
552  // Removing all Layer Tasks that are from the same Area of randomly selected Layer Task
553  for (int i = m_aLayerTasksForRandomization.Count() - 1; i >= 0; i--)
554  {
557  }
558 
559  Print(string.Format("ScenarioFramework: Creating area %1 with Layer Task %2", area.GetOwner().GetName(), layerTask.GetOwner().GetName()), LogLevel.NORMAL);
560  }
561 
562  //------------------------------------------------------------------------------------------------
564  // Main function responsible for selecting available tasks and spawning the areas related to the tasks
566  {
567  if (m_aTaskTypesAvailable.IsEmpty())
568  {
569  Print("ScenarioFramework: Available tasks are empty, no new tasks will be generated.", LogLevel.NORMAL);
570  return;
571  }
572 
573  if (m_aAreas.IsEmpty())
574  {
575  Print("ScenarioFramework: There are no Areas to generate tasks from", LogLevel.NORMAL);
576  return;
577  }
578 
579  Print("ScenarioFramework: ---------------------- Generating tasks -------------------", LogLevel.NORMAL);
580 
581  if (!m_aLayersTaskToSpawn.IsEmpty())
582  {
583  for (int i = 0; i < m_aLayersTaskToSpawn.Count(); i++)
584  {
586  }
587 
589  Print("ScenarioFramework: ---------------------- Generation of tasks completed -------------------", LogLevel.NORMAL);
590 
591  //If counts are not the same, we want randomization to occur
592  if (m_aAreasTasksToSpawn.Count() == m_aLayersTaskToSpawn.Count())
593  return;
594  }
595 
596  //Fetching all Layer Tasks from Areas
597  array<SCR_ScenarioFrameworkLayerTask> layerTasksToRandomize = {};
598  array<SCR_ScenarioFrameworkLayerTask> layerTasks = {};
599  if (m_aDebugAreas.IsEmpty())
600  {
601  foreach (SCR_ScenarioFrameworkArea area : m_aAreas)
602  {
603  if (!area)
604  continue;
605 
606  area.GetAllLayerTasks(layerTasks);
607  layerTasksToRandomize.InsertAll(layerTasks);
608  }
609  }
610  else
611  {
612  SCR_ScenarioFrameworkArea forcedArea;
613  SCR_ScenarioFrameworkArea forcedLayerTask;
614  foreach (SCR_ScenarioFrameworkDebugArea debugArea : m_aDebugAreas)
615  {
616  forcedArea = debugArea.GetForcedArea();
617  if (!forcedArea)
618  continue;
619 
620  //If debug area has LayerTask set, we don't want to put it for randomization
621  if (debugArea.GetForcedLayerTask())
622  continue;
623 
624  forcedArea.GetAllLayerTasks(layerTasks);
625  layerTasksToRandomize.InsertAll(layerTasks);
626  }
627  }
628 
629  //Fetching available Task Types for generation based on type
630  foreach (SCR_ScenarioFrameworkTaskType taskTypeClass : m_aTaskTypesAvailable)
631  {
632  m_aESFTaskTypesAvailable.Insert(taskTypeClass.GetTaskType());
633  }
634 
635  //Removing Layer Tasks that don't have Task Type set in Available Task Types
636  for (int i = layerTasksToRandomize.Count() - 1; i >= 0; i--)
637  {
638  if (!m_aESFTaskTypesAvailable.Contains(layerTasksToRandomize[i].GetTaskType()))
639  layerTasksToRandomize.Remove(i);
640  }
641 
642  //Removing Layer Tasks that don't have activation type set to ON_TASKS_INIT
643  for (int i = layerTasksToRandomize.Count() - 1; i >= 0; i--)
644  {
645  if (layerTasksToRandomize[i].GetActivationType() != SCR_ScenarioFrameworkEActivationType.ON_TASKS_INIT)
646  layerTasksToRandomize.Remove(i);
647  }
648 
649  //Creating a copy so we can work with these in loops
651  m_aLayerTasksForRandomization.Copy(layerTasksToRandomize);
652 
653  //Spawning desired number of tasks
654  for (int i = 0; i < m_iMaxNumberOfTasks; i++)
655  {
656  //Layers Tasks are shrinked down and after certain number of generations, we need to refill it
657  if (m_aLayerTasksForRandomization.IsEmpty())
658  {
659  m_aLayerTasksForRandomization.Copy(layerTasksToRandomize);
660 
661  foreach (SCR_ScenarioFrameworkArea selectedArea : m_aSelectedAreas)
662  {
663  for (int j = m_aLayerTasksForRandomization.Count() - 1; j >= 0; j--)
664  {
665  if (m_aLayerTasksForRandomization[j].GetParentArea() == selectedArea)
666  {
668  continue;
669  }
670  }
671  }
672  }
673 
674  SpawnRandomTask();
675  }
676 
678  Print(string.Format("ScenarioFramework: Available areas do not have any other tasks to generate. Only %1 out of %2 was generated", m_aLayerTasksToBeInitialized, m_iMaxNumberOfTasks), LogLevel.NORMAL);
679 
681  Print("ScenarioFramework: ---------------------- Generation of tasks completed -------------------", LogLevel.NORMAL);
682  }
683 
684  //------------------------------------------------------------------------------------------------
686  protected void PrepareLayerTasksAfterInit()
687  {
688  foreach (SCR_ScenarioFrameworkLayerTask layerTask : m_aLayerTasksToBeInitialized)
689  {
690  if (!layerTask)
691  continue;
692 
693  layerTask.GetOnAllChildrenSpawned().Insert(CheckLayerTasksAfterInit);
694  }
695  }
696 
697  //------------------------------------------------------------------------------------------------
700  {
703  //Due to how Task System sometimes works, not everything is initialized right after the Layer Task so we need to wait a bit
704  GetGame().GetCallqueue().CallLater(AfterLayerTasksInit, 1000);
705 
706  }
707 
708  //------------------------------------------------------------------------------------------------
710  void ProcessVoicelineEnumAndString(typename targetEnum, string targetString)
711  {
712  targetEnum = SCR_ECombatOps_Everon_Tasks;
713  array<string> stringValues = {};
714  SCR_Enum.GetEnumNames(targetEnum, stringValues);
715 
716  int index = stringValues.Find(targetString);
717  if (index != -1)
719  }
720 
721  //------------------------------------------------------------------------------------------------
723  protected void AfterLayerTasksInit()
724  {
725  foreach (SCR_ScenarioFrameworkLayerTask layerTask : m_aLayerTasksToBeInitialized)
726  {
727  if (!layerTask)
728  continue;
729 
730  layerTask.GetOnAllChildrenSpawned().Remove(CheckLayerTasksAfterInit);
731  if (m_bDynamicDespawn && !layerTask.GetDynamicDespawnExcluded())
732  layerTask.DynamicDespawn(null);
733  }
734 
735  foreach (SCR_ScenarioFrameworkActionBase afterTasksInitActions : m_aAfterTasksInitActions)
736  {
737  afterTasksInitActions.Init(m_aAreas.GetRandomElement().GetOwner());
738  }
739  }
740 
741  //------------------------------------------------------------------------------------------------
742  protected void GenerateSingleTask(int index)
743  {
744  if (!m_aLayersTaskToSpawn.IsIndexValid(index) || !m_aAreasTasksToSpawn.IsIndexValid(index))
745  return;
746 
747  string targetLayer = m_aLayersTaskToSpawn[index];
748  string targetArea = m_aAreasTasksToSpawn[index];
749 
750  IEntity layerEntity = GetGame().GetWorld().FindEntityByName(targetLayer);
751  if (!layerEntity)
752  return;
753 
754  SCR_ScenarioFrameworkLayerTask taskComponent = SCR_ScenarioFrameworkLayerTask.Cast(layerEntity.FindComponent(SCR_ScenarioFrameworkLayerTask));
755  if (!taskComponent)
756  return;
757 
758  m_aLayerTasksToBeInitialized.Insert(taskComponent);
759 
760  IEntity areaEntity = GetGame().GetWorld().FindEntityByName(targetArea);
761  if (!areaEntity)
762  areaEntity = layerEntity.GetParent();
763 
764  if (!areaEntity)
765  return;
766 
768  if (!area)
769  return;
770 
771  area.SetAreaSelected(true);
772  taskComponent.SetActivationType(SCR_ScenarioFrameworkEActivationType.ON_TASKS_INIT);
773 
774  area.Create(taskComponent);
775  Print(string.Format("ScenarioFramework: Creating area %1", area.GetOwner().GetName()), LogLevel.NORMAL);
776  Print("ScenarioFramework: ---------------------------------------------------------------", LogLevel.NORMAL);
778  }
779 
780  //------------------------------------------------------------------------------------------------
785  {
786  if (m_aAreas.IsEmpty())
787  return null;
788 
789  SCR_ScenarioFrameworkArea selectedArea;
790  array<SCR_ScenarioFrameworkArea> aAreasCopy = {};
791  aAreasCopy.Copy(m_aAreas);
792  for (int i = 0, count = m_aAreas.Count(); i < count; i++)
793  {
794  Math.Randomize(-1);
795  selectedArea = aAreasCopy.GetRandomElement();
796  if (!selectedArea.GetIsAreaSelected() && selectedArea.GetIsTaskSuitableForArea(eTaskType))
797  {
798  selectedArea.SetAreaSelected(true);
799  return selectedArea;
800  }
801  else
802  {
803  aAreasCopy.RemoveItem(selectedArea);
804  }
805  }
806  return null;
807  }
808 
809  //------------------------------------------------------------------------------------------------
814  {
815  if (!child)
816  return null;
817 
819  IEntity entity = child.GetParent();
820  while (entity)
821  {
822  layer = SCR_ScenarioFrameworkArea.Cast(entity.FindComponent(SCR_ScenarioFrameworkArea));
823  if (layer)
824  return layer;
825 
826  entity = entity.GetParent();
827  }
828 
829  return layer;
830  }
831 
832  //------------------------------------------------------------------------------------------------
837  {
838  int despawnRange = area.GetDynamicDespawnRange();
839 
840  //If this method is called with staySpawned = false, area will be added to m_aDespawnedAreas and gets despawned
841  if (!staySpawned)
842  {
843  m_aDespawnedAreas.Insert(new Tuple3<SCR_ScenarioFrameworkArea, vector, int>(area, area.GetOwner().GetOrigin(), (despawnRange * despawnRange)));
844  area.DynamicDespawn(null);
845  }
846  else
847  {
848  m_aSpawnedAreas.Insert(new Tuple3<SCR_ScenarioFrameworkArea, vector, int>(area, area.GetOwner().GetOrigin(), (despawnRange * despawnRange)));
849  }
850  }
851 
852  //------------------------------------------------------------------------------------------------
856  void RemoveAreaSpecificDynamicDespawn(SCR_ScenarioFrameworkArea area, bool staySpawned = false)
857  {
858  int despawnRange = area.GetDynamicDespawnRange();
859 
860  //If this method is called with staySpawned = false, area will be despawned
861  if (!staySpawned)
862  area.DynamicDespawn(null);
863 
864  for (int i = m_aDespawnedAreas.Count() - 1; i >= 0; i--)
865  {
866  Tuple3<SCR_ScenarioFrameworkArea, vector, int> areaInfo = m_aDespawnedAreas[i];
867  if (area == areaInfo.param1)
868  m_aDespawnedAreas.Remove(i);
869  }
870 
871  for (int i = m_aSpawnedAreas.Count() - 1; i >= 0; i--)
872  {
873  Tuple3<SCR_ScenarioFrameworkArea, vector, int> areaInfo = m_aSpawnedAreas[i];
874  if (area == areaInfo.param1)
875  m_aSpawnedAreas.Remove(i);
876  }
877  }
878 
879  //------------------------------------------------------------------------------------------------
881  protected void PrepareDynamicDespawn()
882  {
883  if (!m_bDynamicDespawn)
884  return;
885 
887 
888  foreach (SCR_ScenarioFrameworkArea area : m_aAreas)
889  {
890  if (!area.GetDynamicDespawnEnabled())
891  continue;
892 
893  int despawnRange = area.GetDynamicDespawnRange();
894  m_aDespawnedAreas.Insert(new Tuple3<SCR_ScenarioFrameworkArea, vector, int>(area, area.GetOwner().GetOrigin(), (despawnRange * despawnRange)));
895 
896  area.DynamicDespawn(null);
897  }
898 
899  GetGame().GetCallqueue().CallLater(CheckDistance, 1000 * m_iUpdateRate, true);
900  }
901 
902  //------------------------------------------------------------------------------------------------
904  protected void CheckDistance()
905  {
906  m_aObservers.Clear();
907  array<int> playerIds = {};
908  PlayerManager playerManager = GetGame().GetPlayerManager();
909  IEntity player;
910  SCR_DamageManagerComponent damageManager;
911  playerManager.GetPlayers(playerIds);
912 
913  foreach (int playerId : playerIds)
914  {
915  player = playerManager.GetPlayerControlledEntity(playerId);
916  if (!player)
917  continue;
918 
919  damageManager = SCR_DamageManagerComponent.GetDamageManager(player);
920  if (damageManager && damageManager.GetState() != EDamageState.DESTROYED)
921  m_aObservers.Insert(player.GetOrigin());
922  }
923 
924  DynamicSpawn();
925  DynamicDespawn();
926  }
927 
928  //------------------------------------------------------------------------------------------------
930  protected void DynamicSpawn()
931  {
932  for (int i = m_aDespawnedAreas.Count() - 1; i >= 0; i--)
933  {
934  Tuple3<SCR_ScenarioFrameworkArea, vector, int> areaInfo = m_aDespawnedAreas[i];
935  foreach (vector observerPos : m_aObservers)
936  {
937  if (vector.DistanceSqXZ(observerPos, areaInfo.param2) < areaInfo.param3)
938  {
939  areaInfo.param1.DynamicReinit();
940  m_aSpawnedAreas.Insert(areaInfo);
941  m_aDespawnedAreas.Remove(i);
942  break;
943  }
944  }
945  }
946  }
947 
948  //------------------------------------------------------------------------------------------------
950  protected void DynamicDespawn()
951  {
952  for (int i = m_aSpawnedAreas.Count() - 1; i >= 0; i--)
953  {
954  Tuple3<SCR_ScenarioFrameworkArea, vector, int> areaInfo = m_aSpawnedAreas[i];
955  bool observerInRange;
956  foreach (vector observerPos : m_aObservers)
957  {
958  if (vector.DistanceSqXZ(observerPos, areaInfo.param2) < areaInfo.param3)
959  {
960  observerInRange = true;
961  break;
962  }
963  }
964 
965  if (!observerInRange)
966  {
967  areaInfo.param1.DynamicDespawn(null);
968  m_aDespawnedAreas.Insert(areaInfo);
969  m_aSpawnedAreas.Remove(i);
970  }
971  }
972  }
973 
974  //------------------------------------------------------------------------------------------------
975  override void OnPostInit(IEntity owner)
976  {
978  GetGame().GetCallqueue().CallLater(Init,1000,false); //TODO: make the init order properly (the init should start after all Areas are registered)
979  }
980 
981  //------------------------------------------------------------------------------------------------
982  override bool RplLoad(ScriptBitReader reader)
983  {
984  return true;
985  }
986 
987  //------------------------------------------------------------------------------------------------
994  void ShowHint(string sTitle, string sSubtitle, int timeOut, FactionKey factionKey = "", int playerID = -1)
995  {
996  Rpc(RpcDo_ShowHint, sTitle, sSubtitle, timeOut, factionKey, playerID);
997  RpcDo_ShowHint(sTitle, sSubtitle, timeOut, factionKey, playerID);
998  }
999 
1000  //------------------------------------------------------------------------------------------------
1007  [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
1008  void RpcDo_ShowHint(string sTitle, string sSubtitle, int timeOut, FactionKey factionKey, int playerID)
1009  {
1010  if (!SCR_StringHelper.IsEmptyOrWhiteSpace(factionKey))
1011  {
1012  if (SCR_FactionManager.SGetLocalPlayerFaction() != GetGame().GetFactionManager().GetFactionByKey(factionKey))
1013  return;
1014  }
1015 
1016  if (playerID != -1)
1017  {
1018  PlayerController playerController = GetGame().GetPlayerController();
1019  if (!playerController)
1020  return;
1021 
1022  if (playerID != playerController.GetPlayerId())
1023  return;
1024  }
1025 
1026  SCR_HintUIInfo info = SCR_HintUIInfo.CreateInfo(WidgetManager.Translate(sTitle), WidgetManager.Translate(sSubtitle), timeOut, 0, 0, true);
1027  if (info)
1028  SCR_HintManagerComponent.ShowHint(info);
1029  }
1030 
1031  //------------------------------------------------------------------------------------------------
1037  void PopUpMessage(string sTitle, string sSubtitle, FactionKey factionKey = "", int playerID = -1)
1038  {
1039  Rpc(RpcDo_PopUpMessage, sTitle, sSubtitle, factionKey, playerID);
1040  RpcDo_PopUpMessage(sTitle, sSubtitle, factionKey, playerID);
1041  }
1042 
1043  //------------------------------------------------------------------------------------------------
1049  [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
1050  void RpcDo_PopUpMessage(string sTitle, string sSubtitle, FactionKey factionKey, int playerID)
1051  {
1052  if (!SCR_StringHelper.IsEmptyOrWhiteSpace(factionKey))
1053  {
1054  if (SCR_FactionManager.SGetLocalPlayerFaction() != GetGame().GetFactionManager().GetFactionByKey(factionKey))
1055  return;
1056  }
1057 
1058  if (playerID != -1)
1059  {
1060  PlayerController playerController = GetGame().GetPlayerController();
1061  if (!playerController)
1062  return;
1063 
1064  if (playerID != playerController.GetPlayerId())
1065  return;
1066  }
1067 
1068  SCR_PopUpNotification.GetInstance().PopupMsg(sTitle, text2: sSubtitle);
1069  }
1070 }
PlayIntroVoiceline
void PlayIntroVoiceline(int playerID, string eventName, EntityID entityID)
Definition: SCR_GameModeSFManager.c:123
m_OnTaskStateChanged
protected ref ScriptInvoker m_OnTaskStateChanged
Definition: SCR_GameModeSFManager.c:59
SCR_BaseGameMode
Definition: SCR_BaseGameMode.c:137
KILL
SCR_GameModeSFManagerClass KILL
SelectRandomAreaByTaskType
SCR_ScenarioFrameworkArea SelectRandomAreaByTaskType(SCR_ESFTaskType eTaskType)
Definition: SCR_GameModeSFManager.c:784
m_iUpdateRate
protected int m_iUpdateRate
Definition: SCR_GameModeSFManager.c:53
PlaySoundOnEntity
void PlaySoundOnEntity(IEntity entity, string sSndName)
Definition: SCR_GameModeSFManager.c:104
CUSTOM2
SCR_GameModeSFManagerClass CUSTOM2
m_OnAllAreasInitiated
protected ref ScriptInvoker m_OnAllAreasInitiated
Definition: SCR_GameModeSFManager.c:58
PlaySoundOnEntityPosition
void PlaySoundOnEntityPosition(IEntity object, string soundFile, string soundEventName)
Definition: SCR_GameModeSFManager.c:248
GetOnAllAreasInitiated
ScriptInvoker GetOnAllAreasInitiated()
Definition: SCR_GameModeSFManager.c:357
m_aTaskTypesAvailable
protected ref array< ref SCR_ScenarioFrameworkTaskType > m_aTaskTypesAvailable
Definition: SCR_GameModeSFManager.c:35
SCR_Enum
Definition: SCR_Enum.c:1
NONE
SCR_GameModeSFManagerClass NONE
RpcDo_ShowHint
void RpcDo_ShowHint(string sTitle, string sSubtitle, int timeOut, FactionKey factionKey, int playerID)
Definition: SCR_GameModeSFManager.c:1008
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
RemoveAreaSpecificDynamicDespawn
void RemoveAreaSpecificDynamicDespawn(SCR_ScenarioFrameworkArea area, bool staySpawned=false)
Definition: SCR_GameModeSFManager.c:856
m_aSpawnedAreas
protected ref array< ref Tuple3< SCR_ScenarioFrameworkArea, vector, int > > m_aSpawnedAreas
Definition: SCR_GameModeSFManager.c:75
DynamicDespawn
protected void DynamicDespawn()
Goes over spawned areas and checks whether or not said area should despawn.
Definition: SCR_GameModeSFManager.c:950
DESTROY
SCR_GameModeSFManagerClass DESTROY
PrepareDynamicDespawn
protected void PrepareDynamicDespawn()
Prepares dynamic spawn/despawn.
Definition: SCR_GameModeSFManager.c:881
GenerateSingleTask
protected void GenerateSingleTask(int index)
Definition: SCR_GameModeSFManager.c:742
m_eGameOverType
EGameOverTypes m_eGameOverType
Definition: SCR_GameModeSFManager.c:63
m_aLayerTasksToBeInitialized
ref array< SCR_ScenarioFrameworkLayerTask > m_aLayerTasksToBeInitialized
Definition: SCR_GameModeSFManager.c:67
ProcessVoicelineEnumAndString
void ProcessVoicelineEnumAndString(typename targetEnum, string targetString)
Definition: SCR_GameModeSFManager.c:710
IsMaster
bool IsMaster()
Definition: SCR_GameModeSFManager.c:410
AfterLayerTasksInit
protected void AfterLayerTasksInit()
Executes AfterTasksInitActions after all Layer Tasks are finished spawning.
Definition: SCR_GameModeSFManager.c:723
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
PrepareAreaSpecificDynamicDespawn
void PrepareAreaSpecificDynamicDespawn(SCR_ScenarioFrameworkArea area, bool staySpawned=false)
Definition: SCR_GameModeSFManager.c:836
EAudioSourceConfigurationFlag
EAudioSourceConfigurationFlag
Definition: SCR_AudioSourceConfiguration.c:1
m_LastFinishedTask
protected SCR_BaseTask m_LastFinishedTask
Definition: SCR_GameModeSFManager.c:62
CUSTOM3
SCR_GameModeSFManagerClass CUSTOM3
RpcDo_PlaySoundOnEntity
void RpcDo_PlaySoundOnEntity(EntityID pEntID, string sSndName)
Definition: SCR_GameModeSFManager.c:84
m_aIntroVoicelineIndexes
ref array< int > m_aIntroVoicelineIndexes
Definition: SCR_GameModeSFManager.c:69
RpcDo_PlayIntroVoiceline
void RpcDo_PlayIntroVoiceline(int playerID, string eventName, EntityID entityID)
Definition: SCR_GameModeSFManager.c:135
DEFAULT
@ DEFAULT
Definition: SCR_CampaignFeedbackComponent.c:1421
SCR_StringHelper
Definition: SCR_StringHelper.c:1
ON_TRIGGER_ACTIVATION
SCR_GameModeSFManagerClass ON_TRIGGER_ACTIVATION
EDamageState
EDamageState
Definition: EDamageState.c:12
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
Attribute
SCR_GameModeSFManagerClass SCR_BaseGameModeComponentClass Attribute("Available Tasks for the Scenario", category:"Tasks")]
RplRpc
SCR_AchievementsHandlerClass ScriptComponentClass RplRpc(RplChannel.Reliable, RplRcver.Owner)] void UnlockOnClient(AchievementId achievement)
Definition: SCR_AchievementsHandler.c:11
m_aLayerTasksForRandomization
ref array< SCR_ScenarioFrameworkLayerTask > m_aLayerTasksForRandomization
Definition: SCR_GameModeSFManager.c:68
SpawnRandomTask
void SpawnRandomTask()
Definition: SCR_GameModeSFManager.c:507
SCR_SoundManagerEntity
Definition: SCR_SoundManagerEntity.c:17
SCR_PopUpNotification
Takes care of dynamic and static onscreen popups.
Definition: SCR_PopupNotification.c:24
PostInit
protected void PostInit()
Definition: SCR_GameModeSFManager.c:499
SetMissionEndScreen
void SetMissionEndScreen(EGameOverTypes GameOverType)
Definition: SCR_GameModeSFManager.c:332
SCR_BaseTask
A base class for tasks.
Definition: SCR_BaseTask.c:8
m_aAreas
ref array< SCR_ScenarioFrameworkArea > m_aAreas
Definition: SCR_GameModeSFManager.c:65
GetFactionByKey
FactionManagerClass GenericEntityClass GetFactionByKey(FactionKey factionKey)
GetOnTaskStateChanged
ScriptInvoker GetOnTaskStateChanged()
Definition: SCR_GameModeSFManager.c:367
Finish
void Finish()
Definition: SCR_GameModeSFManager.c:339
RpcDo_PopUpMessage
void RpcDo_PopUpMessage(string sTitle, string sSubtitle, FactionKey factionKey, int playerID)
Definition: SCR_GameModeSFManager.c:1050
CLEAR_AREA
SCR_GameModeSFManagerClass CLEAR_AREA
ON_INIT
SCR_GameModeSFManagerClass ON_INIT
DELIVER
SCR_GameModeSFManagerClass DELIVER
OnTaskUpdate
void OnTaskUpdate(SCR_BaseTask task, SCR_ETaskEventMask mask)
Definition: SCR_GameModeSFManager.c:301
GetLastFinishedTaskLayer
SCR_ScenarioFrameworkLayerBase GetLastFinishedTaskLayer()
Definition: SCR_GameModeSFManager.c:275
GetOrigin
vector GetOrigin()
Definition: SCR_AIUtilityComponent.c:279
GenerateTasks
void GenerateTasks()
Definition: SCR_GameModeSFManager.c:565
EGameOverTypes
EGameOverTypes
Definition: EGameOverTypes.c:1
LAST
SCR_GameModeSFManagerClass LAST
SCR_HintUIInfo
Definition: SCR_HintUIInfo.c:2
SAME_AS_PARENT
SCR_GameModeSFManagerClass SAME_AS_PARENT
DynamicSpawn
protected void DynamicSpawn()
Goes over despawned areas and checks whether or not said area should spawn.
Definition: SCR_GameModeSFManager.c:930
m_bDynamicDespawn
protected bool m_bDynamicDespawn
Definition: SCR_GameModeSFManager.c:49
m_aSelectedAreas
ref array< SCR_ScenarioFrameworkArea > m_aSelectedAreas
Definition: SCR_GameModeSFManager.c:66
SCR_ScenarioFrameworkArea
Definition: SCR_ScenarioFrameworkArea.c:24
SelectNearestAreaByTaskType
SCR_ScenarioFrameworkArea SelectNearestAreaByTaskType(SCR_ESFTaskType eTaskType)
Definition: SCR_GameModeSFManager.c:379
SCR_GameModeEndData
Definition: SCR_GameModeEndData.c:4
SCR_BaseTaskManager
Definition: SCR_BaseTaskManager.c:25
m_aObservers
protected ref array< vector > m_aObservers
Definition: SCR_GameModeSFManager.c:77
m_aCoreAreas
protected ref array< string > m_aCoreAreas
Definition: SCR_GameModeSFManager.c:43
EntityID
SCR_CompositionSlotManagerComponentClass EntityID
DEFEND
SCR_GameModeSFManagerClass DEFEND
OnPostInit
override void OnPostInit(IEntity owner)
Editable Mine.
Definition: SCR_GameModeSFManager.c:975
CheckLayerTasksAfterInit
protected void CheckLayerTasksAfterInit(SCR_ScenarioFrameworkLayerBase layer)
Checks if all Layer Tasks that were selected by ON_TASK_INIT activation for invoking AfterTasksInitAc...
Definition: SCR_GameModeSFManager.c:699
m_iMaxNumberOfTasks
protected int m_iMaxNumberOfTasks
Definition: SCR_GameModeSFManager.c:37
SCR_ECombatOps_Everon_Tasks
SCR_ECombatOps_Everon_Tasks
Definition: SCR_ECombatOps_Everon_Tasks.c:1
m_aESFTaskTypeForRandomization
ref array< SCR_ESFTaskType > m_aESFTaskTypeForRandomization
Definition: SCR_GameModeSFManager.c:73
Init
protected bool Init()
initialization
Definition: SCR_GameModeSFManager.c:432
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
GetParentArea
SCR_ScenarioFrameworkArea GetParentArea(IEntity child)
Definition: SCR_GameModeSFManager.c:813
m_aDespawnedAreas
protected ref array< ref Tuple3< SCR_ScenarioFrameworkArea, vector, int > > m_aDespawnedAreas
Definition: SCR_GameModeSFManager.c:76
ON_TASKS_INIT
SCR_GameModeSFManagerClass ON_TASKS_INIT
LoadHeaderSettings
protected void LoadHeaderSettings()
Definition: SCR_GameModeCombatOpsManager.c:8
ON_AREA_TRIGGER_ACTIVATION
SCR_GameModeSFManagerClass ON_AREA_TRIGGER_ACTIVATION
RpcDo_PlaySoundOnEntityPosition
void RpcDo_PlaySoundOnEntityPosition(RplId objectID, string soundFile, string soundEventName)
Definition: SCR_GameModeSFManager.c:226
CUSTOM1
SCR_GameModeSFManagerClass CUSTOM1
EXTRACTION
SCR_GameModeSFManagerClass EXTRACTION
Faction
Definition: Faction.c:12
m_aAfterTasksInitActions
protected ref array< ref SCR_ScenarioFrameworkActionBase > m_aAfterTasksInitActions
Definition: SCR_GameModeSFManager.c:40
GetIsMatchOver
bool GetIsMatchOver()
Definition: SCR_GameModeSFManager.c:350
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition: SCR_DestructionSynchronizationComponent.c:17
m_aAreasTasksToSpawn
ref array< string > m_aAreasTasksToSpawn
Definition: SCR_GameModeSFManager.c:70
SCR_ETaskEventMask
SCR_ETaskEventMask
Definition: SCR_BaseTaskManager.c:13
m_LastFinishedTaskLayer
protected SCR_ScenarioFrameworkLayerBase m_LastFinishedTaskLayer
Definition: SCR_GameModeSFManager.c:61
SCR_TaskState
SCR_TaskState
Definition: SCR_TaskState.c:2
RplLoad
override bool RplLoad(ScriptBitReader reader)
Definition: SCR_GameModeSFManager.c:982
SCR_ScenarioFrameworkLayerBase
void SCR_ScenarioFrameworkLayerBase(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_ScenarioFrameworkLayerBase.c:875
SCR_ScenarioFrameworkDebugArea
Definition: SCR_ScenarioFrameworkDebug.c:3
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
ShowHint
void ShowHint(string sTitle, string sSubtitle, int timeOut, FactionKey factionKey="", int playerID=-1)
Definition: SCR_GameModeSFManager.c:994
GetAreas
array< SCR_ScenarioFrameworkArea > GetAreas()
Definition: SCR_GameModeSFManager.c:282
CheckDistance
protected void CheckDistance()
Refreshes array of player characters and checks which areas should spawn/despawn.
Definition: SCR_GameModeSFManager.c:904
SCR_FactionManager
void SCR_FactionManager(IEntitySource src, IEntity parent)
Definition: SCR_FactionManager.c:461
PrepareLayerTasksAfterInit
protected void PrepareLayerTasksAfterInit()
Prepares Layer Tasks that were selected by ON_TASK_INIT activation for invoking AfterTasksInitActions...
Definition: SCR_GameModeSFManager.c:686
SCR_ScenarioFrameworkTask
Definition: SCR_ScenarioFrameworkTask.c:7
SCR_GameModeSFManagerClass
Definition: SCR_GameModeSFManager.c:2
GetActivationType
SCR_ScenarioFrameworkEActivationType GetActivationType()
Definition: SCR_ScenarioFrameworkLayerBase.c:298
m_aLayersTaskToSpawn
ref array< string > m_aLayersTaskToSpawn
Definition: SCR_GameModeSFManager.c:71
CUSTOM4
SCR_GameModeSFManagerClass CUSTOM4
m_bMatchOver
protected bool m_bMatchOver
Definition: SCR_GameModeSFManager.c:55
RegisterArea
void RegisterArea(SCR_ScenarioFrameworkArea area)
Definition: SCR_GameModeSFManager.c:422
OnTaskCreated
void OnTaskCreated(SCR_BaseTask task)
Definition: SCR_GameModeSFManager.c:289
PlayerManager
Definition: PlayerManager.c:12
SCR_BaseGameModeComponentClass
Definition: SCR_BaseGameModeComponent.c:2
GetTaskType
SCR_ESFTaskType GetTaskType()
Definition: SCR_ScenarioFrameworkLayerTask.c:119
m_aDebugAreas
protected ref array< ref SCR_ScenarioFrameworkDebugArea > m_aDebugAreas
Definition: SCR_GameModeSFManager.c:46
m_iCurrentlySpawnedLayerTasks
protected int m_iCurrentlySpawnedLayerTasks
Definition: SCR_GameModeSFManager.c:56
GetLastFinishedTask
SCR_BaseTask GetLastFinishedTask()
Definition: SCR_GameModeSFManager.c:268
PopUpMessage
void PopUpMessage(string sTitle, string sSubtitle, FactionKey factionKey="", int playerID=-1)
Definition: SCR_GameModeSFManager.c:1037
m_aESFTaskTypesAvailable
ref array< SCR_ESFTaskType > m_aESFTaskTypesAvailable
Definition: SCR_GameModeSFManager.c:72
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180
SCR_BaseGameModeComponent
void SCR_BaseGameModeComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_BaseGameModeComponent.c:199