Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TutorialLogic_Navigation.c
Go to the documentation of this file.
3{
4 bool m_bMarkerCreated;
5 ResourceName m_sCompassResourceName = "{61D4F80E49BF9B12}Prefabs/Items/Equipment/Compass/Compass_SY183.et";
6 ResourceName m_sMapResourceName = "{13772C903CB5E4F7}Prefabs/Items/Equipment/Maps/PaperMap_01_folded.et";
7 SCR_TutorialGamemodeComponent m_TutorialComponent;
8
9 //------------------------------------------------------------------------------------------------
10 override void OnCourseStart()
11 {
12 m_TutorialComponent = SCR_TutorialGamemodeComponent.GetInstance();
13
14 GetGame().GetCallqueue().CallLater(CheckForNavigationItems, 250, true);
15 }
16
17 //------------------------------------------------------------------------------------------------
18 override void OnCourseEnd()
19 {
20 GetGame().GetCallqueue().Remove(CheckForNavigationItems);
21
22 if (!m_TutorialComponent)
23 return;
24
25 IEntity vehicle = GetGame().GetWorld().FindEntityByName("SmallJeep2");
26 if (vehicle)
27 m_TutorialComponent.ChangeVehicleLockState(vehicle, true);
28 }
29
30 //------------------------------------------------------------------------------------------------
31 void CheckForNavigationItems()
32 {
33 if (!m_TutorialComponent)
34 return;
35
36 SCR_BaseTutorialStage stage = m_TutorialComponent.GetCurrentStage();
37 if (!stage)
38 return;
39
40 if (!m_TutorialComponent.FindPrefabInPlayerInventory(m_sCompassResourceName))
41 stage.RegisterWaypoint("Navigation_Compass", "", "PICKUP");
42 else
43 stage.UnregisterWaypoint("Navigation_Compass");
44
45 if (!m_TutorialComponent.FindPrefabInPlayerInventory(m_sMapResourceName))
46 stage.RegisterWaypoint("Navigation_Map", "", "PICKUP");
47 else
48 stage.UnregisterWaypoint("Navigation_Map");
49 }
50}
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
proto external BaseWorld GetWorld()
void UnregisterWaypoint(IEntity waypointEntity)
SCR_Waypoint RegisterWaypoint(string entityName, string title=string.Empty, string icon="MISC")