Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_RequestReinforcementsMessage.c
Go to the documentation of this file.
1 
2 //------------------------------------------------------------------------------------------------
4 {
5  protected SCR_CampaignMilitaryBaseComponent m_TargetBase;
6  protected SCR_CampaignFaction m_TargetFaction;
7 
8  //------------------------------------------------------------------------------------------------
9  override void OnDelivery(BaseTransceiver receiver, int freq, float quality)
10  {
11  if (m_TargetBase && m_TargetFaction && receiver.GetRadio() && receiver.GetRadio().GetOwner() == m_TargetFaction.GetMainBase() && GetTaskManager())
12  {
14  if (supportEntity)
15  supportEntity.CreateCampaignDefendTask(m_TargetBase, m_TargetFaction);
16  }
17  }
18 
19  //------------------------------------------------------------------------------------------------
20  void SetTargetFaction(SCR_CampaignFaction targetFaction)
21  {
22  m_TargetFaction = targetFaction;
23  }
24 
25  //------------------------------------------------------------------------------------------------
26  void SetTargetBase(SCR_CampaignMilitaryBaseComponent targetBase)
27  {
28  m_TargetBase = targetBase;
29  }
30 };
SCR_CampaignDefendTaskSupportEntity
Definition: SCR_CampaignDefendTaskSupportEntity.c:13
ScriptedRadioMessage
Definition: ScriptedRadioMessage.c:12
m_TargetFaction
protected Faction m_TargetFaction
Definition: SCR_EditableTaskComponent.c:22
GetTaskManager
SCR_BaseTaskManager GetTaskManager()
Definition: SCR_BaseTaskManager.c:7
BaseTransceiver
Definition: BaseTransceiver.c:12
SCR_CampaignFaction
Definition: SCR_CampaignFaction.c:2
SCR_RequestReinforcementsMessage
Definition: SCR_RequestReinforcementsMessage.c:3
SCR_CampaignMilitaryBaseComponent
Definition: SCR_CampaignMilitaryBaseComponent.c:38