Arma Reforger Explorer
1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CharacterIsInVehicleCondition.c
Go to the documentation of this file.
1
//------------------------------------------------------------------------------------------------
3
[
BaseContainerProps
()]
4
class
SCR_CharacterIsInVehicleCondition
:
SCR_AvailableActionCondition
5
{
6
[
Attribute
(
"false"
, UIWidgets.CheckBox,
"Allow if player is in pilot or driver station"
)]
7
protected
bool
m_bIsDriver;
8
9
[
Attribute
(
"false"
, UIWidgets.CheckBox,
"Allow if player is in turret"
)]
10
protected
bool
m_bIsTurret;
11
12
[
Attribute
(
"false"
, UIWidgets.CheckBox,
"Allow if player is in cargo"
)]
13
protected
bool
m_bIsCargo;
14
15
//------------------------------------------------------------------------------------------------
18
override
bool
IsAvailable(
SCR_AvailableActionsConditionData
data
)
19
{
20
if
(!
data
)
21
return
false
;
22
23
bool
result =
false
;
24
25
// In vehicle
26
if
(
data
.GetIsCharacterInVehicle())
27
{
28
// No compartment type filters - allow all
29
result = !(m_bIsDriver || m_bIsTurret || m_bIsCargo);
30
31
// Check is player fits one of the required roles
32
ECompartmentType
type
=
data
.GetCompartmentType();
33
if
(m_bIsDriver)
34
result = result ||
type
==
ECompartmentType
.Pilot;
35
36
if
(m_bIsTurret)
37
result = result ||
type
==
ECompartmentType
.Turret;
38
39
if
(m_bIsCargo)
40
result = result ||
type
==
ECompartmentType
.Cargo;
41
}
42
43
return
GetReturnResult(result);
44
}
45
};
SCR_AvailableActionsConditionData
Definition:
SCR_AvailableActionsConditionData.c:5
ECompartmentType
ECompartmentType
Definition:
ECompartmentType.c:7
SCR_AvailableActionCondition
A single available action condition representation.
Definition:
SCR_AvailableActionsCondition.c:3
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_CharacterIsInVehicleCondition
Returns true if character is in a vehicle.
Definition:
SCR_CharacterIsInVehicleCondition.c:4
type
EDamageType type
Definition:
SCR_DestructibleTreeV2.c:32
data
Get all prefabs that have the spawner data
Definition:
SCR_EntityCatalogManagerComponent.c:305
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition:
SCR_AIGoalReaction.c:468
scripts_Arma_Reforger_v1.1.0.42
scripts
Game
UI
HUD
AvailableActions
Conditions
Game
Character
SCR_CharacterIsInVehicleCondition.c
Generated by
1.8.17