Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_Tutorial_Intro_GearUp.c
Go to the documentation of this file.
1
[
EntityEditorProps
(insertable:
false
)]
2
class
SCR_Tutorial_Intro_GearUpClass
:
SCR_BaseTutorialStageClass
3
{
4
};
5
6
//------------------------------------------------------------------------------------------------
7
class
SCR_Tutorial_Intro_GearUp
:
SCR_BaseTutorialStage
8
{
9
protected
bool
m_bItemA
;
10
protected
bool
m_bItemB
;
11
protected
SCR_BaseTriggerEntity
m_Trigger
;
12
13
//------------------------------------------------------------------------------------------------
14
override
protected
void
Setup
()
15
{
16
SCR_Waypoint
gearWP;
17
18
if
(
m_TutorialComponent
.IsEntityInPlayerInventory(
"intro_binoculars"
))
19
{
20
m_bItemA
=
true
;
21
}
22
else
23
{
24
gearWP =
RegisterWaypoint
(
"intro_binoculars"
,
""
,
"PICKUP"
);
25
}
26
27
if
(
m_TutorialComponent
.IsEntityInPlayerInventory(
"intro_gloves"
))
28
{
29
m_bItemB
=
true
;
30
}
31
else
32
{
33
gearWP =
RegisterWaypoint
(
"intro_gloves"
,
""
,
"PICKUP"
);
34
}
35
36
SCR_InventoryStorageManagerComponent storageManComp = SCR_InventoryStorageManagerComponent.Cast(
m_Player
.FindComponent(SCR_InventoryStorageManagerComponent));
37
38
if
(storageManComp)
39
{
40
storageManComp.m_OnItemAddedInvoker.Remove(
OnItemAdded
);
41
storageManComp.m_OnItemAddedInvoker.Insert(
OnItemAdded
);
42
}
43
44
m_Trigger
= SCR_BaseTriggerEntity.Cast(
GetGame
().
GetWorld
().FindEntityByName(
"INTRO_FALLTHROUGH_TRIGGER"
));
45
if
(!
m_Trigger
)
46
return
;
47
48
m_Trigger
.GetOnActivate().Insert(
OnStageFinished
);
49
m_Trigger
.EnablePeriodicQueries(
true
);
50
}
51
52
53
//------------------------------------------------------------------------------------------------
54
override
protected
void
OnStageFinished
()
55
{
56
m_Trigger
.GetOnActivate().Remove(
OnStageFinished
);
57
m_Trigger
.EnablePeriodicQueries(
false
);
58
super.OnStageFinished();
59
}
60
61
//------------------------------------------------------------------------------------------------
62
override
protected
bool
GetIsFinished
()
63
{
64
if
(
m_bItemA
&&
m_bItemB
)
65
return
true
;
66
67
return
false
;
68
}
69
70
//------------------------------------------------------------------------------------------------
71
protected
bool
OnItemAdded
(
IEntity
item, BaseInventoryStorageComponent storageComponent)
72
{
73
if
(item.
GetName
() ==
"intro_binoculars"
)
74
{
75
m_bItemA
=
true
;
76
UnregisterWaypoint
(
"intro_binoculars"
);
77
}
78
else
if
(item.
GetName
() ==
"intro_gloves"
)
79
{
80
m_bItemB
=
true
;
81
UnregisterWaypoint
(
"intro_gloves"
);
82
}
83
84
return
true
;
85
}
86
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
EntityEditorProps
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
Definition
SCR_CompassComponent.c:10
IEntity::IEntity
void IEntity(IEntitySource src, IEntity parent)
protected script Constructor
IEntity::GetWorld
proto external BaseWorld GetWorld()
IEntity::GetName
proto external string GetName()
SCR_BaseTutorialStageClass
Definition
SCR_BaseTutorialStage.c:3
SCR_BaseTutorialStage
Definition
SCR_BaseTutorialStage.c:8
SCR_BaseTutorialStage::m_Player
ChimeraCharacter m_Player
Definition
SCR_BaseTutorialStage.c:27
SCR_BaseTutorialStage::UnregisterWaypoint
void UnregisterWaypoint(IEntity waypointEntity)
Definition
SCR_BaseTutorialStage.c:270
SCR_BaseTutorialStage::m_TutorialComponent
SCR_TutorialGamemodeComponent m_TutorialComponent
Definition
SCR_BaseTutorialStage.c:29
SCR_BaseTutorialStage::RegisterWaypoint
SCR_Waypoint RegisterWaypoint(string entityName, string title=string.Empty, string icon="MISC")
Definition
SCR_BaseTutorialStage.c:293
SCR_Tutorial_Intro_GearUpClass
Definition
SCR_Tutorial_Intro_GearUp.c:3
SCR_Tutorial_Intro_GearUp
Definition
SCR_Tutorial_Intro_GearUp.c:8
SCR_Tutorial_Intro_GearUp::OnItemAdded
bool OnItemAdded(IEntity item, BaseInventoryStorageComponent storageComponent)
Definition
SCR_Tutorial_Intro_GearUp.c:71
SCR_Tutorial_Intro_GearUp::OnStageFinished
void OnStageFinished()
Definition
SCR_Tutorial_Intro_GearUp.c:54
SCR_Tutorial_Intro_GearUp::m_bItemA
bool m_bItemA
Definition
SCR_Tutorial_Intro_GearUp.c:9
SCR_Tutorial_Intro_GearUp::m_bItemB
bool m_bItemB
Definition
SCR_Tutorial_Intro_GearUp.c:10
SCR_Tutorial_Intro_GearUp::Setup
void Setup()
Definition
SCR_Tutorial_Intro_GearUp.c:14
SCR_Tutorial_Intro_GearUp::m_Trigger
SCR_BaseTriggerEntity m_Trigger
Definition
SCR_Tutorial_Intro_GearUp.c:11
SCR_Tutorial_Intro_GearUp::GetIsFinished
bool GetIsFinished()
Definition
SCR_Tutorial_Intro_GearUp.c:62
SCR_Waypoint
Definition
SCR_Waypoint.c:3
scripts
Game
GameMode
Tutorial
Stages
INTRO
SCR_Tutorial_Intro_GearUp.c
Generated by
1.17.0