Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_Tutorial_Intro_WakeUp.c
Go to the documentation of this file.
1[EntityEditorProps(insertable: false)]
5
6//------------------------------------------------------------------------------------------------
8{
10
11 //------------------------------------------------------------------------------------------------
12 override protected void Setup()
13 {
14 if (!m_Player)
15 m_TutorialComponent.GetOnPlayerSpawned().Insert(OnPlayerSpawned);
16 else
18 }
19
20 //------------------------------------------------------------------------------------------------
21 protected void OnPlayerSpawned()
22 {
23 m_fStartTimestamp = GetGame().GetWorld().GetWorldTime();
24
25 GetGame().GetCallqueue().Remove(ShowHint);
26 GetGame().GetCallqueue().CallLater(ShowHint, m_StageInfo.GetFailsafeHintTimeout() * 1000, false, 0);
27
28 if (!m_Player)
29 m_Player = m_TutorialComponent.GetPlayer();
30
32
33 m_TutorialComponent.GetOnPlayerSpawned().Remove(OnPlayerSpawned);
34 m_TutorialComponent.PlayBedAnimation(true);
35
36 //Delete items from player inventory for intro reasons
37 const SCR_InventoryStorageManagerComponent inventory = m_TutorialComponent.GetPlayerInventory();
38 IEntity binoculars = inventory.FindItem(SCR_ResourceNamePredicate("{0CF54B9A85D8E0D4}Prefabs/Items/Equipment/Binoculars/Binoculars_M22/Binoculars_M22.et"), EStoragePurpose.PURPOSE_ANY);
39 SCR_EntityHelper.DeleteEntityAndChildren(binoculars);
40
41 IEntity gloves = inventory.FindItem(SCR_ResourceNamePredicate("{D19C474FA0F42CC4}Prefabs/Characters/Handwear/Gloves_Pilot_US_01/Gloves_Pilot_US_01.et"), EStoragePurpose.PURPOSE_ANY);
42 SCR_EntityHelper.DeleteEntityAndChildren(gloves);
43
44 SCR_VoiceoverSystem.GetInstance().RegisterActor(GetGame().GetWorld().FindEntityByName("Soldier_DoorGuard"));
45
46 GetGame().GetCallqueue().CallLater(PlayNarrativeCharacterStage, 1000, false, "Soldier_DoorGuard", 3);
47
49 if (!logic)
50 return;
51
52 logic.SetUpAmbulance();
54 }
55
56 //------------------------------------------------------------------------------------------------
57 override protected bool GetIsFinished()
58 {
59 if (!m_CharController)
60 return false;
61
62 return !m_CharController.IsLoitering() && GetDuration() > 2000;
63 }
64}
ArmaReforgerScripted GetGame()
Definition game.c:1398
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
void IEntity(IEntitySource src, IEntity parent)
protected script Constructor
proto external BaseWorld GetWorld()
SCR_TutorialStageInfo m_StageInfo
SCR_BaseTutorialCourseLogic m_Logic
SCR_TutorialGamemodeComponent m_TutorialComponent
void PlayNarrativeCharacterStage(string characterName, int stage)
void RegisterActor(notnull IEntity entity)
static SCR_VoiceoverSystem GetInstance()
EStoragePurpose