Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CampaignTutorialArlandDrivingAdvanced1.c
Go to the documentation of this file.
1 [EntityEditorProps(insertable: false)]
3 {
4 };
5 
6 //------------------------------------------------------------------------------------------------
8 {
9  //------------------------------------------------------------------------------------------------
10  override protected void Setup()
11  {
12  m_fDuration = 10;
13  m_bConditionPassCheck = true;
14  SCR_HintManagerComponent.HideHint();
15  SCR_HintManagerComponent.ClearLatestHint();
16 
17  m_TutorialComponent.ResetStage_VehiclesHeavy();
18 
19  Vehicle repairTruck = m_TutorialComponent.GetRepairTruck();
20 
21 
22  GetGame().GetCallqueue().CallLater(PlaySoundSystem, 2000, false, "Start", false);
23 
24  if (!repairTruck)
25  return;
26 
27  SlotManagerComponent slotManager = SlotManagerComponent.Cast(repairTruck.FindComponent(SlotManagerComponent));
28 
29  if (!slotManager)
30  return;
31 
32  EntitySlotInfo slotInfo = slotManager.GetSlotByName("RepairBox");
33  if (!slotInfo)
34  return;
35 
36  IEntity cargo = slotInfo.GetAttachedEntity();
37  if (!cargo)
38  return;
39 
40  SCR_ResourceComponent resourceComponent = SCR_ResourceComponent.FindResourceComponent(cargo);
41 
42  if (!resourceComponent)
43  return;
44 
45  SCR_ResourceGenerator resourceGenerator = resourceComponent.GetGenerator(EResourceGeneratorID.VEHICLE_LOAD, EResourceType.SUPPLIES);
46 
47  if (!resourceGenerator)
48  return;
49 
50  resourceGenerator.RequestGeneration(350);
51  }
52 
53  //------------------------------------------------------------------------------------------------
54  override bool GetIsFinished()
55  {
56  return !m_TutorialComponent.GetVoiceSystem().IsPlaying();
57  }
58 };
SCR_BaseCampaignTutorialArlandStage
Definition: SCR_BaseCampaignTutorialArlandStage.c:7
m_fDuration
float m_fDuration
Definition: SendGoalMessage.c:437
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_CampaignTutorialArlandDrivingAdvanced1Class
Definition: SCR_CampaignTutorialArlandDrivingAdvanced1.c:2
EntitySlotInfo
Adds ability to attach an object to a slot.
Definition: EntitySlotInfo.c:8
SCR_CampaignTutorialArlandDrivingAdvanced1
Definition: SCR_CampaignTutorialArlandDrivingAdvanced1.c:7
EResourceType
EResourceType
Definition: SCR_ResourceContainer.c:1
SCR_BaseCampaignTutorialArlandStageClass
Definition: SCR_BaseCampaignTutorialArlandStage.c:2
SCR_ResourceGenerator
Definition: SCR_ResourceGenerator.c:79
EResourceGeneratorID
EResourceGeneratorID
Definition: SCR_ResourceGenerator.c:1