Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TutorialNavigation19.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  SCR_HintManagerComponent.HideHint();
13  SCR_HintManagerComponent.ClearLatestHint();
14 
15  m_fDuration = 12;
16  m_bConditionPassCheck = true;
17 
18  GetGame().GetCallqueue().CallLater(TeleportFromVehicle, m_fDuration * 1000, false);
19 
20  IEntity waypoint = GetGame().GetWorld().FindEntityByName("WP_GREENHOUSE");
21  if (!waypoint)
22  return;
23 
24  PlaySoundSystem("Navigation_Finish", true);
25 
26  m_TutorialComponent.SetStagesComplete(3, true);
27  }
28 
29  //------------------------------------------------------------------------------------------------
30  protected void TeleportFromVehicle()
31  {
32  IEntity vehicle = GetGame().GetWorld().FindEntityByName("Navigation_car");
33  if (!vehicle)
34  return;
35 
36  CompartmentAccessComponent compartmentAccessComp = CompartmentAccessComponent.Cast(vehicle.FindComponent(CompartmentAccessComponent));
37  if (!compartmentAccessComp)
38  return;
39 
40  IEntity tpPos = GetGame().GetWorld().FindEntityByName("PP_START");
41  if (!tpPos)
42  return;
43 
44  vector mat[4];
45  tpPos.GetTransform(mat);
46  compartmentAccessComp.MoveOutVehicle(-1, mat);
47  }
48 
49  //------------------------------------------------------------------------------------------------
50  override bool GetIsFinished()
51  {
52  return !m_TutorialComponent.GetVoiceSystem().IsPlaying();
53  }
54 };
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_TutorialNavigation19Class
Definition: SCR_TutorialNavigation19.c:2
SCR_BaseCampaignTutorialArlandStageClass
Definition: SCR_BaseCampaignTutorialArlandStage.c:2
SCR_TutorialNavigation19
Definition: SCR_TutorialNavigation19.c:7