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_CombatEngineering_LoadSupplies_1.c
Go to the documentation of this file.
1
[
EntityEditorProps
(insertable:
false
)]
2
class
SCR_Tutorial_CombatEngineering_LoadSupplies_1Class
:
SCR_BaseTutorialStageClass
3
{
4
};
5
6
//------------------------------------------------------------------------------------------------
7
class
SCR_Tutorial_CombatEngineering_LoadSupplies_1
:
SCR_BaseTutorialStage
8
{
9
protected
SCR_ResourceContainer
m_SupplyContainer
;
10
//------------------------------------------------------------------------------------------------
11
override
protected
void
Setup
()
12
{
13
RegisterWaypoint
(
"ARLEVILLE_SUPPLIES"
,
""
,
"UNLOAD"
).
SetOffsetVector
(
"0 1.5 0"
);
14
15
PlayNarrativeCharacterStage
(
"COMBATENGINEERING_Instructor_D"
, 2);
16
17
SetupSupplyConsumer
();
18
}
19
20
//------------------------------------------------------------------------------------------------
21
protected
void
SetupSupplyConsumer
()
22
{
23
IEntity
supplyTruck =
GetGame
().GetWorld().FindEntityByName(
"BUILDING_VEHICLE"
);
24
25
if
(!supplyTruck)
26
return
;
27
28
SlotManagerComponent slotManager = SlotManagerComponent.Cast(supplyTruck.
FindComponent
(SlotManagerComponent));
29
30
if
(!slotManager)
31
return
;
32
33
EntitySlotInfo
slotInfo = slotManager.GetSlotByName(
"EngineerBox"
);
34
if
(!slotInfo)
35
return
;
36
37
IEntity
cargo = slotInfo.GetAttachedEntity();
38
if
(!cargo)
39
return
;
40
41
SCR_ResourceComponent resourceComp = SCR_ResourceComponent.FindResourceComponent(cargo);
42
if
(!resourceComp)
43
return
;
44
45
m_SupplyContainer
= resourceComp.GetContainer(
EResourceType
.SUPPLIES);
46
}
47
48
//------------------------------------------------------------------------------------------------
49
override
protected
bool
GetIsFinished
()
50
{
51
if
(!
m_SupplyContainer
)
52
return
false
;
53
54
return
m_SupplyContainer
.GetResourceValue() ==
m_SupplyContainer
.GetMaxResourceValue();
55
}
56
};
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
EResourceType
EResourceType
Definition
SCR_ResourceContainer.c:2
EntitySlotInfo
Adds ability to attach an object to a slot.
Definition
EntitySlotInfo.c:9
IEntity::IEntity
void IEntity(IEntitySource src, IEntity parent)
protected script Constructor
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
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_ResourceContainer
Definition
SCR_ResourceContainer.c:35
SCR_Tutorial_CombatEngineering_LoadSupplies_1Class
Definition
SCR_Tutorial_CombatEngineering_LoadSupplies_1.c:3
SCR_Tutorial_CombatEngineering_LoadSupplies_1
Definition
SCR_Tutorial_CombatEngineering_LoadSupplies_1.c:8
SCR_Tutorial_CombatEngineering_LoadSupplies_1::SetupSupplyConsumer
void SetupSupplyConsumer()
Definition
SCR_Tutorial_CombatEngineering_LoadSupplies_1.c:21
SCR_Tutorial_CombatEngineering_LoadSupplies_1::GetIsFinished
bool GetIsFinished()
Definition
SCR_Tutorial_CombatEngineering_LoadSupplies_1.c:49
SCR_Tutorial_CombatEngineering_LoadSupplies_1::m_SupplyContainer
SCR_ResourceContainer m_SupplyContainer
Definition
SCR_Tutorial_CombatEngineering_LoadSupplies_1.c:9
SCR_Tutorial_CombatEngineering_LoadSupplies_1::Setup
void Setup()
Definition
SCR_Tutorial_CombatEngineering_LoadSupplies_1.c:11
SCR_Waypoint::SetOffsetVector
void SetOffsetVector(vector offset)
Definition
SCR_Waypoint.c:56
scripts
Game
GameMode
Tutorial
Stages
CombatEngineeringCourse
SCR_Tutorial_CombatEngineering_LoadSupplies_1.c
Generated by
1.17.0