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_Seizing_CaptureBase.c
Go to the documentation of this file.
1
[
EntityEditorProps
(insertable:
false
)]
2
class
SCR_Tutorial_Seizing_CaptureBaseClass
:
SCR_BaseTutorialStageClass
3
{
4
};
5
6
//------------------------------------------------------------------------------------------------
7
class
SCR_Tutorial_Seizing_CaptureBase
:
SCR_BaseTutorialStage
8
{
9
SCR_FactionAffiliationComponent
m_AffiliationComp;
10
SCR_PopUpNotification
m_PopUpNotification;
11
SCR_SeizingComponent
m_SeizingComponent;
12
13
//------------------------------------------------------------------------------------------------
14
override
protected
void
Setup
()
15
{
16
SCR_HintManagerComponent.HideHint();
17
SCR_HintManagerComponent.ClearLatestHint();
18
19
m_PopUpNotification =
SCR_PopUpNotification
.
GetInstance
();
20
21
IEntity
base
=
GetGame
().GetWorld().FindEntityByName(
"FakeBaseLighthouseNorth"
);
22
RegisterWaypoint
(
base
);
23
m_AffiliationComp =
SCR_FactionAffiliationComponent
.Cast(
base
.FindComponent(
SCR_FactionAffiliationComponent
));
24
m_AffiliationComp.
SetFaction
(
base
,
GetGame
().GetFactionManager().
GetFactionByKey
(
"USSR"
));
25
26
BaseGameTriggerEntity trigger;
27
IEntity
child =
base
.GetChildren();
28
while
(child)
29
{
30
if
(child.IsInherited(BaseGameTriggerEntity))
31
{
32
trigger = BaseGameTriggerEntity.Cast(child);
33
break
;
34
}
35
36
child = child.
GetSibling
();
37
}
38
39
if
(trigger)
40
trigger.SetSphereRadius(12);
41
42
m_SeizingComponent =
SCR_SeizingComponent
.Cast(
base
.FindComponent(
SCR_SeizingComponent
));
43
m_SeizingComponent.
GetOnCaptureStart
().Insert(
OnSeizingStarted
);
44
m_SeizingComponent.GetOnCaptureInterrupt().Insert(
OnSeizingInterrupted
);
45
46
PlayNarrativeCharacterStage
(
"CONFLICT_Instructor_C"
, 5);
47
48
}
49
50
//------------------------------------------------------------------------------------------------
51
protected
void
OnSeizingStarted
(
SCR_Faction
faction,
SCR_SeizingComponent
seizingComponent)
52
{
53
m_PopUpNotification.PopupMsg(
"#AR-Campaign_SeizingFriendly-UC"
, -1, prio: SCR_ECampaignSeizingMessagePrio.SEIZING_YOU, progressStart: m_SeizingComponent.GetSeizingStartTimestamp(), progressEnd: m_SeizingComponent.GetSeizingEndTimestamp(),
category
:
SCR_EPopupMsgFilter
.TUTORIAL);
54
}
55
56
//------------------------------------------------------------------------------------------------
57
protected
void
OnSeizingInterrupted
(
SCR_Faction
faction,
SCR_SeizingComponent
seizingComponent)
58
{
59
m_PopUpNotification.HideCurrentMsg();
60
}
61
62
//------------------------------------------------------------------------------------------------
63
override
protected
bool
GetIsFinished
()
64
{
65
if
(m_AffiliationComp)
66
{
67
if
(m_AffiliationComp.GetAffiliatedFaction() ==
GetGame
().GetFactionManager().
GetFactionByKey
(
"USSR"
))
68
return
false
;
69
70
IEntity
fakeBase =
GetGame
().GetWorld().FindEntityByName(
"FakeBaseLighthouseNorth"
);
71
if
(fakeBase)
72
{
73
SCR_TutorialFakeBaseComponent fakeBaseComponent = SCR_TutorialFakeBaseComponent.Cast(fakeBase.
FindComponent
(SCR_TutorialFakeBaseComponent));
74
if
(fakeBaseComponent)
75
{
76
//TODO: SUBOPTIMAL
77
fakeBaseComponent.m_BaseColor =
Color
.FromRGBA(4,141,231,255);
78
fakeBaseComponent.m_eMilitarySymbolIdentity =
EMilitarySymbolIdentity
.BLUFOR;
79
fakeBaseComponent.m_sHighlight =
"Friend_Installation_Focus_Land"
;
80
fakeBaseComponent.CreateLinks();
81
}
82
83
return
true
;
84
}
85
}
86
87
return
false
;
88
}
89
90
//------------------------------------------------------------------------------------------------
91
void
~SCR_Tutorial_Seizing_CaptureBase
()
92
{
93
m_PopUpNotification.HideCurrentMsg();
94
m_SeizingComponent.GetOnCaptureStart().Remove(
OnSeizingStarted
);
95
m_SeizingComponent.GetOnCaptureInterrupt().Remove(
OnSeizingInterrupted
);
96
}
97
};
EMilitarySymbolIdentity
EMilitarySymbolIdentity
Definition
EMilitarySymbol.c:2
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
base
around base
Definition
SCR_HoldCampaignMilitaryBaseTaskEntity.c:9
SCR_EPopupMsgFilter
SCR_EPopupMsgFilter
Definition
SCR_PopupNotification.c:633
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
Color
Definition
Color.c:13
IEntity::IEntity
void IEntity(IEntitySource src, IEntity parent)
protected script Constructor
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
IEntity::GetSibling
proto external IEntity GetSibling()
SCR_BaseTutorialStageClass
Definition
SCR_BaseTutorialStage.c:3
SCR_BaseTutorialStage
Definition
SCR_BaseTutorialStage.c:8
SCR_BaseTutorialStage::RegisterWaypoint
SCR_Waypoint RegisterWaypoint(string entityName, string title=string.Empty, string icon="MISC")
Definition
SCR_BaseTutorialStage.c:293
SCR_BaseTutorialStage::PlayNarrativeCharacterStage
void PlayNarrativeCharacterStage(string characterName, int stage)
Definition
SCR_BaseTutorialStage.c:510
SCR_FactionAffiliationComponent
Definition
SCR_FactionAffiliationComponent.c:11
SCR_FactionAffiliationComponent::SetFaction
static void SetFaction(IEntity owner, Faction faction)
Definition
SCR_FactionAffiliationComponent.c:38
SCR_Faction
Definition
SCR_Faction.c:6
SCR_PopUpNotification
Takes care of dynamic and static onscreen popups.
Definition
SCR_PopupNotification.c:25
SCR_PopUpNotification::GetInstance
static SCR_PopUpNotification GetInstance()
Definition
SCR_PopupNotification.c:59
SCR_SeizingComponent
Definition
SCR_SeizingComponent.c:19
SCR_SeizingComponent::GetOnCaptureStart
ScriptInvoker GetOnCaptureStart()
Definition
SCR_SeizingComponent.c:125
SCR_Tutorial_Seizing_CaptureBaseClass
Definition
SCR_Tutorial_Seizing_CaptureBase.c:3
SCR_Tutorial_Seizing_CaptureBase
Definition
SCR_Tutorial_Seizing_CaptureBase.c:8
SCR_Tutorial_Seizing_CaptureBase::GetIsFinished
bool GetIsFinished()
Definition
SCR_Tutorial_Seizing_CaptureBase.c:63
SCR_Tutorial_Seizing_CaptureBase::OnSeizingInterrupted
void OnSeizingInterrupted(SCR_Faction faction, SCR_SeizingComponent seizingComponent)
Definition
SCR_Tutorial_Seizing_CaptureBase.c:57
SCR_Tutorial_Seizing_CaptureBase::OnSeizingStarted
void OnSeizingStarted(SCR_Faction faction, SCR_SeizingComponent seizingComponent)
Definition
SCR_Tutorial_Seizing_CaptureBase.c:51
SCR_Tutorial_Seizing_CaptureBase::~SCR_Tutorial_Seizing_CaptureBase
void ~SCR_Tutorial_Seizing_CaptureBase()
Definition
SCR_Tutorial_Seizing_CaptureBase.c:91
SCR_Tutorial_Seizing_CaptureBase::Setup
void Setup()
Definition
SCR_Tutorial_Seizing_CaptureBase.c:14
GetFactionByKey
FactionManagerClass GenericEntityClass GetFactionByKey(FactionKey factionKey)
scripts
Game
GameMode
Tutorial
Stages
Conflict
SCR_Tutorial_Seizing_CaptureBase.c
Generated by
1.17.0