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_CarControllerComponent.c
Go to the documentation of this file.
1
class
SCR_CarControllerComponentClass
:
CarControllerComponentClass
2
{
3
}
4
9
class
SCR_CarControllerComponent :
CarControllerComponent
10
{
11
//------------------------------------------------------------------------------------------------
12
override
void
OnCompartmentEntered
(
IEntity
vehicle,
BaseCompartmentManagerComponent
mgr,
IEntity
occupant,
int
managerId,
int
slotID)
13
{
14
super.OnCompartmentEntered(vehicle, mgr, occupant, managerId, slotID);
15
16
if
(mgr.FindCompartment(slotID, managerId) ==
GetPilotCompartmentSlot
())
17
GetGame
().GetInputManager().AddActionListener(
"CarLightsHiBeamToggle"
,
EActionTrigger
.DOWN,
ActionCarLightsHiBeamToggle
);
18
}
19
20
//------------------------------------------------------------------------------------------------
21
override
void
OnCompartmentLeft
(
IEntity
vehicle,
BaseCompartmentManagerComponent
mgr,
IEntity
occupant,
int
managerId,
int
slotID)
22
{
23
super.OnCompartmentLeft(vehicle, mgr, occupant, managerId, slotID);
24
25
if
(mgr.FindCompartment(slotID, managerId) ==
GetPilotCompartmentSlot
())
26
GetGame
().GetInputManager().RemoveActionListener(
"CarLightsHiBeamToggle"
,
EActionTrigger
.DOWN,
ActionCarLightsHiBeamToggle
);
27
}
28
29
//------------------------------------------------------------------------------------------------
30
protected
void
ActionCarLightsHiBeamToggle
(
float
value,
EActionTrigger
trigger)
31
{
32
PilotCompartmentSlot
pilotSlot =
GetPilotCompartmentSlot
();
33
if
(!pilotSlot || pilotSlot.GetOccupant() !=
SCR_PlayerController
.
GetLocalControlledEntity
())
34
return
;
35
36
BaseLightManagerComponent
lightManager = GetLightManager();
37
if
(lightManager)
38
lightManager.SetLightsState(
ELightType
.HiBeam, !lightManager.GetLightsState(
ELightType
.HiBeam));
39
}
40
}
ELightType
ELightType
Definition
ELightType.c:8
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
OnCompartmentEntered
void OnCompartmentEntered(AIAgent agent, IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
Definition
SCR_AIUtilityComponent.c:428
OnCompartmentLeft
void OnCompartmentLeft(AIAgent agent, IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
Definition
SCR_AIUtilityComponent.c:442
ActionCarLightsHiBeamToggle
void ActionCarLightsHiBeamToggle(float value, EActionTrigger trigger)
Definition
SCR_CarControllerComponent.c:30
GetPilotCompartmentSlot
PilotCompartmentSlot GetPilotCompartmentSlot()
Get primary pilot compartment slot.
Definition
Vehicle.c:104
BaseCompartmentManagerComponent
Definition
BaseCompartmentManagerComponent.c:13
BaseLightManagerComponent
Definition
BaseLightManagerComponent.c:13
CarControllerComponentClass
Definition
CarControllerComponentClass.c:13
CarControllerComponent
Definition
CarControllerComponent.c:13
IEntity
Definition
IEntity.c:13
PilotCompartmentSlot
Definition
PilotCompartmentSlot.c:13
SCR_CarControllerComponentClass
Definition
SCR_CarControllerComponent.c:2
SCR_PlayerController
Definition
SCR_PlayerController.c:31
SCR_PlayerController::GetLocalControlledEntity
static IEntity GetLocalControlledEntity()
Definition
SCR_PlayerController.c:495
EActionTrigger
EActionTrigger
Definition
EActionTrigger.c:13
scripts
GameCode
Vehicle
SCR_CarControllerComponent.c
Generated by
1.17.0