Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ScenarioFrameworkLayerTaskDefend.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/ScenarioFramework/Layer", description: "")]
3 {
4 }
5 
6 class SCR_ScenarioFrameworkLayerTaskDefend : SCR_ScenarioFrameworkLayerTask
7 {
8  [Attribute(desc: "Will use trigger that is named for Defend params calculations", category: "Task")]
9  protected string m_sTriggerName;
10 
11  [Attribute(uiwidget: UIWidgets.LocaleEditBox, desc: "Text that will be displayed above the countdown number", category: "Defend params")]
12  protected LocalizedString m_sCountdownTitleText;
13 
14  [Attribute(defvalue: "-1", UIWidgets.Slider, desc: "For how long you have to Defend the objective of the task. Value -1 is for indefinitely.", params: "-1 86400 1", category: "Defend params")]
15  protected float m_fDefendTime;
16 
17  [Attribute(defvalue: "1", desc: "When enabled, it will display the text and how much time remains for the Task Defend", category: "Defend params")]
18  protected bool m_bDisplayCountdownHUD;
19 
20  [Attribute(defvalue: "{47864BB47AB0B1F4}UI/layouts/HUD/CampaignMP/CampaignMainHUD.layout", category: "Defend params")]
21  protected ResourceName m_sCountdownHUD;
22 
23  [Attribute(category: "Defend params")]
24  protected ref array<ref SCR_ScenarioFrameworkTaskDefendFactionSettings> m_aFactionSettings;
25 
26  [Attribute(uiwidget: UIWidgets.Slider, desc: "When compared to the number of attackers, minimum of how much of the characters present in the task area must be from defending side to successfully complete the objective on evaluation", params: "0 1 0.01", precision: 2, category: "Defend params")]
28 
29  [Attribute(uiwidget: UIWidgets.EditBox, desc: "Layer containing attacker forces. Can be more layers, but these layers must include only AI units/groups and nothing else.", category: "Defend params")]
30  protected ref array<string> m_aAttackerLayerNames;
31 
32  [Attribute(desc: "When enabled, it will can finish the task earlier than the countdown when all attackers are eliminated", category: "Defend params")]
33  protected bool m_bEarlierEvaluation;
34 
35  [Attribute(desc: "When enabled, evaluation will be delayed and defenders will need to eliminate all attackers in order for the task to be succesfully completed", category: "Defend params")]
36  protected bool m_bDelayedEvaluation;
37 
38  [Attribute(desc: "When enabled, it will display the text to inform players that they have to eliminate all attacker units", category: "Defend params")]
40 
41  [Attribute(uiwidget: UIWidgets.LocaleEditBox, desc: "Text that will be displayed to inform players that they have to eliminate all attacker units", category: "Defend params")]
43 
45 
46  protected float m_fTempCountdown = m_fDefendTime;
47 
48  protected string m_sFormattedCountdownTitle = string.Format(WidgetManager.Translate("<color rgba=\"226, 168, 80, 255\">%1</color>", m_sCountdownTitleText));
49  protected string m_sFormattedDelayedEvaluationText = string.Format(WidgetManager.Translate("<color rgba=\"226, 168, 80, 255\">%1</color>", m_sDelayedEvaluationText));
50 
51  protected ref array<SCR_ScenarioFrameworkLayerBase> m_aAttackerLayer = {};
52 
53  protected float m_fTempTimeSlice;
54  protected bool m_bTaskEvaluated;
55  protected bool m_bEvaluationSet;
56  protected WorldTimestamp m_fEvaluateTimeStart;
57  protected WorldTimestamp m_fEvaluateTimeEnd;
58 
59  protected Widget m_wRoot;
60  protected Widget m_wInfoOverlay;
61  protected Widget m_wCountdownOverlay;
62  protected RichTextWidget m_wCountdown;
63  protected RichTextWidget m_wFlavour;
64 
65  //------------------------------------------------------------------------------------------------
67  float GetDefendTime()
68  {
69  return m_fDefendTime;
70  }
71 
72  //------------------------------------------------------------------------------------------------
74  void SetDefendTime(float time)
75  {
76  m_fDefendTime = time;
77  }
78 
79  //------------------------------------------------------------------------------------------------
82  {
84  }
85 
86  //------------------------------------------------------------------------------------------------
89  {
90  IEntity foundEntity = GetGame().GetWorld().FindEntityByName(m_sTriggerName);
91  if (!foundEntity)
92  return;
93 
94  SCR_ScenarioFrameworkSlotTrigger slotTrigger = SCR_ScenarioFrameworkSlotTrigger.Cast(foundEntity.FindComponent(SCR_ScenarioFrameworkSlotTrigger));
95  if (!slotTrigger)
96  return;
97 
98  SCR_CharacterTriggerEntity trigger = SCR_CharacterTriggerEntity.Cast(slotTrigger.GetSpawnedEntity());
99  if (!trigger)
100  return;
101 
102  m_CharacterTriggerEntity = trigger;
103  }
104 
105  //------------------------------------------------------------------------------------------------
106  override bool SetSupportEntity()
107  {
109  {
110  Print("ScenarioFramework: Task Defend support entity not found in the world, task won't be created!", LogLevel.ERROR);
111  return false;
112  }
114  return true;
115  }
116 
117  //------------------------------------------------------------------------------------------------
118  // constructor
122  void SCR_ScenarioFrameworkLayerTaskDefend(IEntityComponentSource src, IEntity ent, IEntity parent)
123  {
124  m_eTypeOfTask = SCR_ESFTaskType.DEFEND;
125  }
126 
127  //------------------------------------------------------------------------------------------------
128  protected void CountAttackerDefenderNumbers(out int defenderCount, out int attackerCount)
129  {
130  for (int i = 0, count = m_aFactionSettings.Count(); i < count; i++)
131  {
132  SCR_ScenarioFrameworkTaskDefendDefendingFaction defender = SCR_ScenarioFrameworkTaskDefendDefendingFaction.Cast(m_aFactionSettings[i]);
133  if (defender)
134  {
135  if (defender.GetCountOnlyPlayers())
136  defenderCount += m_CharacterTriggerEntity.GetPlayersCountByFactionInsideTrigger(defender.GetFaction());
137  else
138  defenderCount += m_CharacterTriggerEntity.GetCharacterCountByFactionInsideTrigger(defender.GetFaction());
139  }
140 
141  SCR_ScenarioFrameworkTaskDefendAttackingFaction attacker = SCR_ScenarioFrameworkTaskDefendAttackingFaction.Cast(m_aFactionSettings[i]);
142  if (attacker)
143  {
144  if (attacker.GetCountOnlyPlayers())
145  attackerCount += m_CharacterTriggerEntity.GetPlayersCountByFactionInsideTrigger(attacker.GetFaction());
146  else
147  attackerCount += m_CharacterTriggerEntity.GetCharacterCountByFactionInsideTrigger(attacker.GetFaction());
148  }
149  }
150  }
151 
152  //------------------------------------------------------------------------------------------------
155  {
156  m_bTaskEvaluated = true;
157 
158  if (!m_Task)
159  {
160  SCR_ScenarioFrameworkTask taskToFind;
161  array<SCR_BaseTask> activeTasks = {};
162  GetTaskManager().GetTasks(activeTasks);
163 
164  foreach (SCR_BaseTask task : activeTasks)
165  {
166  taskToFind = SCR_ScenarioFrameworkTask.Cast(task);
167  if (!taskToFind)
168  continue;
169 
170  if (taskToFind.GetLayerTask() == this)
171  {
172  m_Task = taskToFind;
173  break;
174  }
175  }
176  }
177 
178  if (!m_Task)
179  {
181  return;
182  }
183 
184  if (!m_CharacterTriggerEntity && !m_sTriggerName.IsEmpty())
186 
188  {
189  int defenderCount = 0;
190  int attackerCount = 0;
191  CountAttackerDefenderNumbers(defenderCount, attackerCount);
192 
193  if (m_fMinDefenderPercentageRatio == 0 || attackerCount == 0)
194  {
195  m_SupportEntity.FinishTask(m_Task);
197  return;
198  }
199 
200  float defenderRatioEval = defenderCount / attackerCount;
201  if (defenderRatioEval < m_fMinDefenderPercentageRatio)
202  {
203  m_SupportEntity.FailTask(m_Task);
205  return;
206  }
207  }
208 
209  m_SupportEntity.FinishTask(m_Task);
211  }
212 
213  //------------------------------------------------------------------------------------------------
215  {
216  SCR_ScenarioFrameworkLayerBase attackerLayer;
217  IEntity attackerLayerEntity;
218  foreach (string layerName : m_aAttackerLayerNames)
219  {
220  attackerLayerEntity = GetGame().GetWorld().FindEntityByName(layerName);
221  if (!attackerLayerEntity)
222  continue;
223 
224  attackerLayer = SCR_ScenarioFrameworkLayerBase.Cast(attackerLayerEntity.FindComponent(SCR_ScenarioFrameworkLayerBase));
225  if (!attackerLayer)
226  continue;
227 
228  m_aAttackerLayer.Insert(attackerLayer);
229  }
230  }
231 
232  //------------------------------------------------------------------------------------------------
234  {
235  if (m_fDefendTime > 0)
236  {
237  ChimeraWorld world = GetOwner().GetWorld();
238  m_fEvaluateTimeStart = world.GetServerTimestamp();
239  m_fEvaluateTimeEnd = m_fEvaluateTimeStart.PlusSeconds(m_fDefendTime);
240  m_bEvaluationSet = true;
241  }
242 
245 
246  //If trigger is already set via the Trigger Name attribute, we don't need to search for it
248  return;
249 
250  for (int i = 0, count = m_aChildren.Count(); i < count; i++)
251  {
253  if (!layerBase)
254  continue;
255 
256  array<IEntity> spawnedEntities = layerBase.GetSpawnedEntities();
257  for (int j = 0, countJ = spawnedEntities.Count(); j < countJ; j++)
258  {
259  SCR_CharacterTriggerEntity charTriggr = SCR_CharacterTriggerEntity.Cast(spawnedEntities[j]);
260  if (charTriggr)
261  m_CharacterTriggerEntity = charTriggr;
262  }
263  }
264  }
265 
266  //------------------------------------------------------------------------------------------------
268  override void RestoreToDefault(bool includeChildren = false, bool reinitAfterRestoration = false)
269  {
271  m_fTempCountdown = m_fDefendTime;
272  m_fTempTimeSlice = 0;
273  m_bTaskEvaluated = false;
274  m_bEvaluationSet = false;
275  m_wRoot = null;
276  m_wInfoOverlay = null;
277  m_wCountdownOverlay = null;
278  m_wCountdown = null;
279  m_wFlavour = null;
280 
281  m_aAttackerLayer.Clear();
282 
283  super.RestoreToDefault(includeChildren, reinitAfterRestoration);
284  }
285 
286  //------------------------------------------------------------------------------------------------
288  {
289  }
290 
291  //------------------------------------------------------------------------------------------------
292  override void Init(SCR_ScenarioFrameworkArea area = null, SCR_ScenarioFrameworkEActivationType activation = SCR_ScenarioFrameworkEActivationType.SAME_AS_PARENT)
293  {
294  if (m_bInitiated)
295  return;
296 
297  if (!m_bDynamicallyDespawned && activation != m_eActivationType)
298  {
299  if (m_ParentLayer)
300  m_ParentLayer.CheckAllChildrenSpawned(this);
301  }
302 
304  {
305  //If just one condition is false, we don't continue and interrupt the init
306  if (!activationCondition.Init(GetOwner()))
307  {
308  if (m_ParentLayer)
309  m_ParentLayer.CheckAllChildrenSpawned(this);
310 
311  return;
312  }
313  }
314 
315  super.Init(area, activation);
316  }
317 
318  //------------------------------------------------------------------------------------------------
320  {
321  m_bInitiated = true;
322 
323  ActivateLogic();
324  foreach (SCR_ScenarioFrameworkPlugin plugin : m_aPlugins)
325  {
326  plugin.Init(this);
327  }
328 
329  foreach (SCR_ScenarioFrameworkActionBase activationAction : m_aActivationActions)
330  {
331  activationAction.Init(GetOwner());
332  }
333 
334  if (m_ParentLayer)
335  m_ParentLayer.CheckAllChildrenSpawned(this);
336 
338 
339  if (m_fRepeatedSpawnTimer >= 0)
340  RepeatedSpawn();
341 
342  if (!m_sTriggerName.IsEmpty())
344 
345  InitHUD();
346  SetupEvaluation();
347  OnPostInit(GetOwner());
348  }
349 
350  //------------------------------------------------------------------------------------------------
351  override void OnPostInit(IEntity owner)
352  {
353  super.OnPostInit(owner);
354  if (m_bInitiated)
355  {
356  SetEventMask(owner, EntityEvent.INIT | EntityEvent.FRAME);
357  }
358  }
359 
360  //------------------------------------------------------------------------------------------------
362  void InitHUD()
363  {
364  SCR_HUDManagerComponent hudManager = GetGame().GetHUDManager();
365  if (!hudManager)
366  return;
367 
368  m_wRoot = hudManager.CreateLayout(m_sCountdownHUD, EHudLayers.MEDIUM, 0);
369  if (!m_wRoot)
370  return;
371 
372  m_wInfoOverlay = m_wRoot.FindAnyWidget("Info");
373  m_wCountdownOverlay = m_wRoot.FindAnyWidget("Countdown");
374  ImageWidget leftFlag = ImageWidget.Cast(m_wRoot.FindAnyWidget("FlagSideBlue"));
375  ImageWidget rightFlag = ImageWidget.Cast(m_wRoot.FindAnyWidget("FlagSideRed"));
376  RichTextWidget leftScore = RichTextWidget.Cast(m_wRoot.FindAnyWidget("ScoreBlue"));
377  RichTextWidget rightScore = RichTextWidget.Cast(m_wRoot.FindAnyWidget("ScoreRed"));
378  RichTextWidget winScore = RichTextWidget.Cast(m_wRoot.FindAnyWidget("TargetScore"));
379  m_wCountdown = RichTextWidget.Cast(m_wRoot.FindAnyWidget("CountdownWin"));
380  m_wFlavour = RichTextWidget.Cast(m_wRoot.FindAnyWidget("FlavourText"));
381  ImageWidget winScoreSideLeft = ImageWidget.Cast(m_wRoot.FindAnyWidget("ObjectiveLeft"));
382  ImageWidget winScoreSideRight = ImageWidget.Cast(m_wRoot.FindAnyWidget("ObjectiveRight"));
383 
384  m_wInfoOverlay.SetVisible(false);
385  leftFlag.SetVisible(false);
386  rightFlag.SetVisible(false);
387  leftScore.SetVisible(false);
388  rightScore.SetVisible(false);
389  winScore.SetVisible(false);
390  winScoreSideLeft.SetVisible(false);
391  winScoreSideRight.SetVisible(false);
392 
393  string shownTime = SCR_FormatHelper.GetTimeFormatting(m_fTempCountdown, ETimeFormatParam.DAYS | ETimeFormatParam.HOURS, ETimeFormatParam.DAYS | ETimeFormatParam.HOURS | ETimeFormatParam.MINUTES);
394  m_wCountdown.SetText(shownTime);
395 
397 
398  if (!m_bDisplayCountdownHUD)
399  m_wRoot.SetVisible(false);
400  }
401 
402  //------------------------------------------------------------------------------------------------
404  void UpdateHUD()
405  {
406  m_fTempTimeSlice = 0;
408 
409  int taskID = -1;
410  if (m_Task)
411  taskID = m_Task.GetTaskID();
412 
413  Rpc(RpcDo_UpdateHUD, m_fTempCountdown, taskID);
414 
415  if (!m_wRoot)
416  return;
417 
418  if (m_fTempCountdown < 0 || !m_Task || !m_bDisplayCountdownHUD)
419  {
421  {
423  m_wRoot.SetVisible(true);
424  m_wCountdownOverlay.SetVisible(false);
425  return;
426  }
427 
428  m_wRoot.SetVisible(false);
429  return;
430  }
431 
432  if (m_Task.GetTaskState() == SCR_TaskState.CANCELLED || m_Task.GetTaskState() == SCR_TaskState.FINISHED)
433  {
434  m_wRoot.SetVisible(false);
435  return;
436  }
437 
438  string shownTime = SCR_FormatHelper.GetTimeFormatting(m_fTempCountdown, ETimeFormatParam.DAYS | ETimeFormatParam.HOURS, ETimeFormatParam.DAYS | ETimeFormatParam.HOURS | ETimeFormatParam.MINUTES);
439  m_wCountdown.SetText(shownTime);
440 
442  m_wRoot.SetVisible(true);
443  }
444 
445  //------------------------------------------------------------------------------------------------
449  [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
450  void RpcDo_UpdateHUD(float countdown, int taskID)
451  {
452  m_fTempCountdown = countdown;
453 
454  if (!m_wRoot)
455  {
456  InitHUD();
457  if (!m_wRoot)
458  return;
459  }
460 
461  if (!m_Task)
462  {
463  SCR_BaseTaskManager taskManager = GetTaskManager();
464  if (taskManager)
465  m_Task = SCR_ScenarioFrameworkTask.Cast(taskManager.GetTask(taskID));
466  }
467 
468  if (m_fTempCountdown < 0 || !m_Task || !m_bDisplayCountdownHUD)
469  {
471  {
473  m_wRoot.SetVisible(true);
474  m_wCountdownOverlay.SetVisible(false);
475  return;
476  }
477 
478  m_wRoot.SetVisible(false);
479  return;
480  }
481 
482  if (m_Task.GetTaskState() == SCR_TaskState.CANCELLED || m_Task.GetTaskState() == SCR_TaskState.FINISHED)
483  {
484  m_wRoot.SetVisible(false);
485  return;
486  }
487 
488  string shownTime = SCR_FormatHelper.GetTimeFormatting(m_fTempCountdown, ETimeFormatParam.DAYS | ETimeFormatParam.HOURS, ETimeFormatParam.DAYS | ETimeFormatParam.HOURS | ETimeFormatParam.MINUTES);
489  m_wCountdown.SetText(shownTime);
490 
492  m_wRoot.SetVisible(true);
493  }
494 
495  //------------------------------------------------------------------------------------------------
498  {
499  m_fTempTimeSlice = 0;
500  foreach (SCR_ScenarioFrameworkLayerBase attackerLayer : m_aAttackerLayer)
501  {
502  if (attackerLayer.GetEnableRepeatedSpawn() && attackerLayer.GetRepeatedSpawnNumber() > 1)
503  return;
504 
505  array<IEntity> spawnedEntities = attackerLayer.GetSpawnedEntities();
506  SCR_ChimeraCharacter character;
507  DamageManagerComponent damageManager;
508  foreach (IEntity entity : spawnedEntities)
509  {
510  character = SCR_ChimeraCharacter.Cast(entity);
511  if (!character)
512  {
513  SCR_AIGroup group = SCR_AIGroup.Cast(entity);
514  if (group)
515  return;
516  else
517  continue;
518  }
519 
520  damageManager = character.GetDamageManager();
521  if (!damageManager.IsDestroyed())
522  return;
523  }
524  }
525 
526  EvaluateStatus();
527  }
528 
529  //------------------------------------------------------------------------------------------------
532  {
534  GetOwner().ClearFlags(EntityFlags.ACTIVE);
535 
536  UpdateHUD();
537  }
538 
539  //------------------------------------------------------------------------------------------------
540  override void EOnFrame(IEntity owner, float timeSlice)
541  {
542  super.EOnFrame(owner, timeSlice);
543 
544  m_fTempTimeSlice += timeSlice;
546  {
547  UpdateHUD();
550  }
551  else if (m_bEarlierEvaluation && m_fTempTimeSlice >= 5)
552  {
554  }
555 
556  ChimeraWorld world = owner.GetWorld();
557  if (!m_bTaskEvaluated && m_bEvaluationSet && world.GetServerTimestamp().GreaterEqual(m_fEvaluateTimeEnd))
558  {
561 
563  EvaluateStatus();
564  }
565  }
566 }
567 
568 //------------------------------------------------------------------------------------------------
571 {
572  [Attribute(defvalue: "", UIWidgets.EditBox, desc: "Faction Name", category: "")]
573  protected FactionKey m_sFactionKey;
574 
575  [Attribute(defvalue: "0", UIWidgets.EditBox, desc: "When disabled, all units from this faction will be counted with for other Task Defend conditions", category: "")]
576  protected bool m_bCountOnlyPlayers;
577 
578  //------------------------------------------------------------------------------------------------
580  Faction GetFaction()
581  {
582  FactionManager factionManager = GetGame().GetFactionManager();
583  if (factionManager)
584  return factionManager.GetFactionByKey(m_sFactionKey);
585 
586  return null;
587  }
588 
589  //------------------------------------------------------------------------------------------------
591  void SetFactionKey(FactionKey factionKey)
592  {
593  m_sFactionKey = factionKey;
594  }
595 
596  //------------------------------------------------------------------------------------------------
598  bool GetCountOnlyPlayers()
599  {
600  return m_bCountOnlyPlayers;
601  }
602 }
603 
604 //------------------------------------------------------------------------------------------------
605 class SCR_ScenarioFrameworkTaskDefendDefendingFactionTitle : BaseContainerCustomTitle
606 {
607  override bool _WB_GetCustomTitle(BaseContainer source, out string title)
608  {
609  title = "Defending faction";
610  return true;
611  }
612 }
613 
614 //------------------------------------------------------------------------------------------------
616 {
617  override bool _WB_GetCustomTitle(BaseContainer source, out string title)
618  {
619  title = "Attacking faction";
620  return true;
621  }
622 }
623 
624 //------------------------------------------------------------------------------------------------
625 [BaseContainerProps(), SCR_ScenarioFrameworkTaskDefendDefendingFactionTitle()]
626 class SCR_ScenarioFrameworkTaskDefendDefendingFaction : SCR_ScenarioFrameworkTaskDefendFactionSettings
627 {
628 }
629 
630 //------------------------------------------------------------------------------------------------
632 class SCR_ScenarioFrameworkTaskDefendAttackingFaction : SCR_ScenarioFrameworkTaskDefendFactionSettings
633 {
634 }
m_fEvaluateTimeStart
protected WorldTimestamp m_fEvaluateTimeStart
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:56
m_aPlugins
protected ref array< ref SCR_ScenarioFrameworkPlugin > m_aPlugins
Definition: SCR_ScenarioFrameworkLayerBase.c:55
m_wFlavour
protected RichTextWidget m_wFlavour
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:63
ChimeraWorld
Definition: ChimeraWorld.c:12
SCR_HUDManagerComponent
Definition: SCR_HUDManagerComponent.c:23
m_fTempTimeSlice
protected float m_fTempTimeSlice
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:53
DynamicDespawn
override void DynamicDespawn(SCR_ScenarioFrameworkLayerBase layer)
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:287
m_wCountdown
protected RichTextWidget m_wCountdown
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:62
SCR_ScenarioFrameworkActivationConditionBase
Definition: SCR_ScenarioFrameworkSlotBase.c:677
m_eActivationType
protected SCR_ScenarioFrameworkEActivationType m_eActivationType
Definition: SCR_ScenarioFrameworkLayerBase.c:43
RestoreToDefault
override void RestoreToDefault(bool includeChildren=false, bool reinitAfterRestoration=false)
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:268
m_sFormattedCountdownTitle
protected string m_sFormattedCountdownTitle
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:48
m_bInitiated
protected bool m_bInitiated
Definition: SCR_ScenarioFrameworkLayerBase.c:72
m_wRoot
protected Widget m_wRoot
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:59
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
SCR_FormatHelper
Definition: SCR_FormatHelper.c:1
InitHUD
void InitHUD()
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:362
m_Task
SCR_EditableTaskComponentClass m_Task
Editable SCR_BaseTask.
SetSupportEntity
override bool SetSupportEntity()
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:106
m_aAttackerLayer
protected ref array< SCR_ScenarioFrameworkLayerBase > m_aAttackerLayer
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:51
m_bDelayedEvaluation
protected bool m_bDelayedEvaluation
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:36
m_bCountOnlyPlayers
protected bool m_bCountOnlyPlayers
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:545
GetOnAllChildrenSpawned
ScriptInvokerScenarioFrameworkLayer GetOnAllChildrenSpawned()
Definition: SCR_ScenarioFrameworkLayerBase.c:450
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
m_bShowDebugShapesDuringRuntime
protected bool m_bShowDebugShapesDuringRuntime
Definition: SCR_ScenarioFrameworkLayerBase.c:40
Init
override void Init(SCR_ScenarioFrameworkArea area=null, SCR_ScenarioFrameworkEActivationType activation=SCR_ScenarioFrameworkEActivationType.SAME_AS_PARENT)
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:292
m_bTaskEvaluated
protected bool m_bTaskEvaluated
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:54
EOnFrame
override void EOnFrame(IEntity owner, float timeSlice)
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:540
SetupEvaluation
void SetupEvaluation()
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:233
m_aActivationActions
protected ref array< ref SCR_ScenarioFrameworkActionBase > m_aActivationActions
Definition: SCR_ScenarioFrameworkLayerBase.c:49
m_CharacterTriggerEntity
protected SCR_CharacterTriggerEntity m_CharacterTriggerEntity
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:44
SCR_ScenarioFrameworkLayerTaskClass
Definition: SCR_ScenarioFrameworkLayerTask.c:2
m_fTempCountdown
protected float m_fTempCountdown
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:46
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
ActivateLogic
protected void ActivateLogic()
Definition: SCR_ScenarioFrameworkLayerBase.c:631
RplRpc
SCR_AchievementsHandlerClass ScriptComponentClass RplRpc(RplChannel.Reliable, RplRcver.Owner)] void UnlockOnClient(AchievementId achievement)
Definition: SCR_AchievementsHandler.c:11
SCR_ScenarioFrameworkTaskDefendAttackingFactionTitle
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:615
SCR_BaseTask
A base class for tasks.
Definition: SCR_BaseTask.c:8
m_sFactionKey
protected FactionKey m_sFactionKey
Definition: SCR_ScenarioFrameworkLayerBase.c:25
FindCharacterTriggerEntity
void FindCharacterTriggerEntity()
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:88
m_fRepeatedSpawnTimer
protected float m_fRepeatedSpawnTimer
Definition: SCR_ScenarioFrameworkLayerBase.c:37
m_fMinDefenderPercentageRatio
protected float m_fMinDefenderPercentageRatio
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:27
EHudLayers
EHudLayers
Definition: SCR_HUDManagerComponent.c:5
m_sFormattedDelayedEvaluationText
protected string m_sFormattedDelayedEvaluationText
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:49
ETimeFormatParam
ETimeFormatParam
Definition: ETimeFormatParam.c:4
m_sCountdownHUD
protected ResourceName m_sCountdownHUD
Definition: SCR_CharacterTriggerEntity.c:50
SCR_ScenarioFrameworkTaskDefendSupportEntity
Definition: SCR_ScenarioFrameworkTaskDefendSupportEntity.c:8
SCR_ContainerActionTitle
SCR_ContainerActionTitle BaseContainerCustomTitle SCR_ContainerActionTitle()] class SCR_ScenarioFrameworkActionBase
Definition: SCR_ScenarioFrameworkActions.c:43
m_bDynamicallyDespawned
protected bool m_bDynamicallyDespawned
Definition: SCR_ScenarioFrameworkLayerBase.c:74
SCR_ScenarioFrameworkArea
Definition: SCR_ScenarioFrameworkArea.c:24
m_aChildren
protected ref array< SCR_ScenarioFrameworkLayerBase > m_aChildren
Definition: SCR_ScenarioFrameworkLayerBase.c:57
GetTaskManager
SCR_BaseTaskManager GetTaskManager()
Definition: SCR_BaseTaskManager.c:7
SCR_ScenarioFrameworkLayerTaskDefendClass
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:2
RepeatedSpawn
protected void RepeatedSpawn()
Definition: SCR_ScenarioFrameworkLayerBase.c:426
SCR_BaseTaskManager
Definition: SCR_BaseTaskManager.c:25
m_bEvaluationSet
protected bool m_bEvaluationSet
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:55
OnPostInit
override void OnPostInit(IEntity owner)
Editable Mine.
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:351
m_wInfoOverlay
protected Widget m_wInfoOverlay
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:60
SetDefendTime
void SetDefendTime(float time)
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:74
m_bDisplayDelayedEvaluationText
protected bool m_bDisplayDelayedEvaluationText
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:39
BaseContainerProps
SCR_ScenarioFrameworkTaskDefendAttackingFactionTitle BaseContainerCustomTitle BaseContainerProps()
m_aFactionSettings
protected ref array< ref SCR_ScenarioFrameworkTaskDefendFactionSettings > m_aFactionSettings
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:24
RemovePeriodicUpdates
void RemovePeriodicUpdates()
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:531
SCR_ScenarioFrameworkPlugin
Definition: SCR_ScenarioFrameworkLayerBase.c:888
CountAttackerDefenderNumbers
protected void CountAttackerDefenderNumbers(out int defenderCount, out int attackerCount)
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:128
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
m_fEvaluateTimeEnd
protected WorldTimestamp m_fEvaluateTimeEnd
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:57
GetDefendTime
float GetDefendTime()
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:67
SetupAttackerLayer
void SetupAttackerLayer()
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:214
m_ParentLayer
protected SCR_ScenarioFrameworkLayerBase m_ParentLayer
Definition: SCR_ScenarioFrameworkLayerBase.c:65
AfterAllChildrenSpawned
override void AfterAllChildrenSpawned(SCR_ScenarioFrameworkLayerBase layer)
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:319
Faction
Definition: Faction.c:12
SCR_CharacterTriggerEntity
Definition: SCR_CharacterTriggerEntity.c:17
m_bEarlierEvaluation
protected bool m_bEarlierEvaluation
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:33
SCR_TaskState
SCR_TaskState
Definition: SCR_TaskState.c:2
m_aAttackerLayerNames
protected ref array< string > m_aAttackerLayerNames
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:30
SCR_ScenarioFrameworkTaskDefendFactionSettings
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:570
SCR_AIGroup
Definition: SCR_AIGroup.c:68
SCR_ScenarioFrameworkLayerBase
void SCR_ScenarioFrameworkLayerBase(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_ScenarioFrameworkLayerBase.c:875
UpdateHUD
void UpdateHUD()
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:404
Attribute
SCR_ScenarioFrameworkLayerTaskDefendClass SCR_ScenarioFrameworkLayerTaskClass Attribute(desc:"Will use trigger that is named for Defend params calculations", category:"Task")
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:8
RpcDo_UpdateHUD
void RpcDo_UpdateHUD(float countdown, int taskID)
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:450
m_wCountdownOverlay
protected Widget m_wCountdownOverlay
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:61
GetCharacterTriggerEntity
SCR_CharacterTriggerEntity GetCharacterTriggerEntity()
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:81
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
SCR_ScenarioFrameworkTask
Definition: SCR_ScenarioFrameworkTask.c:7
m_sDelayedEvaluationText
protected LocalizedString m_sDelayedEvaluationText
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:42
DamageManagerComponent
Definition: DamageManagerComponent.c:12
SCR_ScenarioFrameworkLayerTaskDefend
void SCR_ScenarioFrameworkLayerTaskDefend(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:122
LocalizedString
Definition: LocalizedString.c:21
EvaluateStatus
void EvaluateStatus()
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:154
category
UI layouts HUD CampaignMP CampaignMainHUD category
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:21
_WB_GetCustomTitle
class SCR_ScenarioFrameworkTaskDefendFactionSettings _WB_GetCustomTitle(BaseContainer source, out string title)
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:607
m_aActivationConditions
protected ref array< ref SCR_ScenarioFrameworkActivationConditionBase > m_aActivationConditions
Definition: SCR_ScenarioFrameworkLayerBase.c:46
CheckAttackerLayers
void CheckAttackerLayers()
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:497