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_SquadLeadership_END.c
Go to the documentation of this file.
1
[
EntityEditorProps
(insertable:
false
)]
2
class
SCR_Tutorial_SquadLeadership_ENDClass
:
SCR_BaseTutorialStageClass
3
{
4
};
5
6
//------------------------------------------------------------------------------------------------
7
class
SCR_Tutorial_SquadLeadership_END
:
SCR_BaseTutorialStage
8
{
9
//------------------------------------------------------------------------------------------------
10
override
protected
void
Setup
()
11
{
12
SCR_HintManagerComponent.HideHint();
13
SCR_HintManagerComponent.ClearLatestHint();
14
15
SeparateAI
();
16
//PlayNarrativeCharacterStage("SQUADLEADERSHIP_Instructor", 17);
17
SCR_VoiceoverSystem
.
GetInstance
().
PlaySequence
(
"End"
);
18
}
19
20
//------------------------------------------------------------------------------------------------
21
protected
void
SeparateAI
()
22
{
23
SCR_PlayerController
playerController =
SCR_PlayerController
.Cast(
GetGame
().
GetPlayerController
());
24
if
(!playerController)
25
return
;
26
27
SCR_PlayerControllerGroupComponent playerGroupComp = SCR_PlayerControllerGroupComponent.Cast(playerController.FindComponent(SCR_PlayerControllerGroupComponent));
28
if
(!playerGroupComp)
29
return
;
30
31
SCR_GroupsManagerComponent
groupsManager =
SCR_GroupsManagerComponent
.GetInstance();
32
if
(!groupsManager)
33
return
;
34
35
SCR_AIGroup
group = groupsManager.FindGroup(playerGroupComp.GetGroupID());
36
if
(!group)
37
return
;
38
39
array <AIAgent> agents = {};
40
group.
GetSlave
().GetAgents(agents);
41
42
if
(!agents || agents.IsEmpty())
43
return
;
44
45
SCR_AIGroup
newGroup =
SCR_AIGroup
.Cast(
GetGame
().
SpawnEntityPrefabEx
(
"{000CD338713F2B5A}Prefabs/AI/Groups/Group_Base.et"
, 0));
46
if
(!newGroup)
47
return
;
48
49
newGroup.SetName(
"OldGroup"
);
50
51
foreach
(AIAgent agent : agents)
52
{
53
newGroup.AddAgent(agent);
54
}
55
56
IEntity
pos =
GetGame
().GetWorld().FindEntityByName(
"WP_SquadLeadership_DEFEND"
);
57
if
(!pos)
58
return
;
59
60
AIWaypoint wp = AIWaypoint.Cast(
m_TutorialComponent
.SpawnAsset(
"COMMANDING_DEFEND_OLD"
,
"{93291E72AC23930F}Prefabs/AI/Waypoints/AIWaypoint_Defend.et"
, pos));
61
if
(wp)
62
newGroup.AddWaypoint(wp);
63
64
}
65
66
//------------------------------------------------------------------------------------------------
67
override
bool
GetIsFinished
()
68
{
69
return
m_sLastFinishedEvent
==
"SOUND_TUTORIAL_TA_POSITION_DEFENDED_INSTRUCTOR_O_02"
||
GetDuration
() > 15000;
70
}
71
}
SpawnEntityPrefabEx
IEntity SpawnEntityPrefabEx(ResourceName prefab, bool randomizeEditableVariant, BaseWorld world=null, EntitySpawnParams params=null)
Definition
game.c:90
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
SCR_GroupsManagerComponent
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_GroupsManagerComponent.c:1747
IEntity::IEntity
void IEntity(IEntitySource src, IEntity parent)
protected script Constructor
SCR_AIGroup
Definition
SCR_AIGroup.c:75
SCR_AIGroup::GetSlave
SCR_AIGroup GetSlave()
Definition
SCR_AIGroup.c:2604
SCR_BaseTutorialStageClass
Definition
SCR_BaseTutorialStage.c:3
SCR_BaseTutorialStage
Definition
SCR_BaseTutorialStage.c:8
SCR_BaseTutorialStage::m_sLastFinishedEvent
string m_sLastFinishedEvent
Definition
SCR_BaseTutorialStage.c:21
SCR_BaseTutorialStage::GetDuration
float GetDuration()
Definition
SCR_BaseTutorialStage.c:42
SCR_BaseTutorialStage::m_TutorialComponent
SCR_TutorialGamemodeComponent m_TutorialComponent
Definition
SCR_BaseTutorialStage.c:29
SCR_PlayerController
Definition
SCR_PlayerController.c:31
SCR_Tutorial_SquadLeadership_ENDClass
Definition
SCR_Tutorial_SquadLeadership_END.c:3
SCR_Tutorial_SquadLeadership_END
Definition
SCR_Tutorial_SquadLeadership_END.c:8
SCR_Tutorial_SquadLeadership_END::Setup
void Setup()
Definition
SCR_Tutorial_SquadLeadership_END.c:10
SCR_Tutorial_SquadLeadership_END::GetIsFinished
override bool GetIsFinished()
Definition
SCR_Tutorial_SquadLeadership_END.c:67
SCR_Tutorial_SquadLeadership_END::SeparateAI
void SeparateAI()
Definition
SCR_Tutorial_SquadLeadership_END.c:21
SCR_VoiceoverSystem
Definition
SCR_VoiceoverSystem.c:3
SCR_VoiceoverSystem::GetInstance
static SCR_VoiceoverSystem GetInstance()
Definition
SCR_VoiceoverSystem.c:159
SCR_VoiceoverSystem::PlaySequence
void PlaySequence(string sequenceName, IEntity actor1=null, IEntity actor2=null, IEntity actor3=null, IEntity actor4=null, IEntity actor5=null, bool playImmediately=true)
Plays a sequence of voiceover lines defined in loaded config (see SetData).
Definition
SCR_VoiceoverSystem.c:300
GetPlayerController
proto external PlayerController GetPlayerController()
Definition
SCR_PlayerDeployMenuHandlerComponent.c:307
scripts
Game
GameMode
Tutorial
Stages
Commanding
SCR_Tutorial_SquadLeadership_END.c
Generated by
1.17.0