Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CharacterIsInVehicleCondition.c
Go to the documentation of this file.
1
4{
5 [Attribute("false", UIWidgets.CheckBox, "Allow if player is in pilot or driver station")]
6 protected bool m_bIsDriver;
7
8 [Attribute("false", UIWidgets.CheckBox, "Allow if player is in turret")]
9 protected bool m_bIsTurret;
10
11 [Attribute("false", UIWidgets.CheckBox, "Allow if player is in cargo")]
12 protected bool m_bIsCargo;
13
14 //------------------------------------------------------------------------------------------------
18 {
19 bool result;
20 // In vehicle
21 if (data.GetIsCharacterInVehicle())
22 {
23 // No compartment type filters - allow all
24 result = !(m_bIsDriver || m_bIsTurret || m_bIsCargo);
25
26 // Check is player fits one of the required roles
27 ECompartmentType type = data.GetCompartmentType();
28 if (m_bIsDriver)
29 result = result || type == ECompartmentType.PILOT;
30
31 if (m_bIsTurret)
32 result = result || type == ECompartmentType.TURRET;
33
34 if (m_bIsCargo)
35 result = result || type == ECompartmentType.CARGO;
36 }
37
38 return GetReturnResult(result);
39 }
40}
ECompartmentType
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
EDamageType type
Get all prefabs that have the spawner data
A single available action condition representation.
Returns true if character is in a vehicle.
override bool IsAvailable(notnull SCR_AvailableActionsConditionData data)
SCR_FieldOfViewSettings Attribute