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_SwitchFlashlightLensAction.c
Go to the documentation of this file.
1
class
SCR_SwitchFlashlightLensAction
:
ScriptedUserAction
2
{
3
[
Attribute
(
"1"
,
desc
:
"If script should go from first to last (true) or last to first (false)"
)]
4
protected
bool
m_bCycleDirection
;
5
6
SCR_FlashlightComponent
m_FlashlightComp
;
7
8
//------------------------------------------------------------------------------------------------
9
override
void
Init
(
IEntity
pOwnerEntity,
GenericComponent
pManagerComponent)
10
{
11
m_FlashlightComp
=
SCR_FlashlightComponent
.Cast(pOwnerEntity.
FindComponent
(
SCR_FlashlightComponent
));
12
}
13
14
//------------------------------------------------------------------------------------------------
15
override
bool
CanBeShownScript
(
IEntity
user)
16
{
17
if
(!
m_FlashlightComp
||
m_FlashlightComp
.GetNumberOfAvailableLenses() < 2)
18
return
false
;
19
20
ChimeraCharacter
character =
ChimeraCharacter
.Cast(user);
21
if
(!character)
22
return
false
;
23
24
CharacterControllerComponent controller = character.GetCharacterController();
25
return
controller && controller.GetInspectEntity() ==
GetOwner
();
26
}
27
28
//------------------------------------------------------------------------------------------------
29
override
void
PerformAction
(
IEntity
pOwnerEntity,
IEntity
pUserEntity)
30
{
31
if
(!
m_FlashlightComp
)
32
return
;
33
34
m_FlashlightComp
.CycleThroughLenses(
m_bCycleDirection
);
35
}
36
}
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
BaseUserAction::GetOwner
proto external IEntity GetOwner()
Returns the parent entity of this action.
ChimeraCharacter
Definition
ChimeraCharacter.c:13
GenericComponent
Definition
GenericComponent.c:13
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_FlashlightComponent
Definition
SCR_FlashlightComponent.c:20
SCR_SwitchFlashlightLensAction
Definition
SCR_SwitchFlashlightLensAction.c:2
SCR_SwitchFlashlightLensAction::m_bCycleDirection
bool m_bCycleDirection
Definition
SCR_SwitchFlashlightLensAction.c:4
SCR_SwitchFlashlightLensAction::PerformAction
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
Definition
SCR_SwitchFlashlightLensAction.c:29
SCR_SwitchFlashlightLensAction::Init
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
Definition
SCR_SwitchFlashlightLensAction.c:9
SCR_SwitchFlashlightLensAction::CanBeShownScript
override bool CanBeShownScript(IEntity user)
Definition
SCR_SwitchFlashlightLensAction.c:15
SCR_SwitchFlashlightLensAction::m_FlashlightComp
SCR_FlashlightComponent m_FlashlightComp
Definition
SCR_SwitchFlashlightLensAction.c:6
ScriptedUserAction
Definition
ScriptedUserAction.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UserActions
SCR_SwitchFlashlightLensAction.c
Generated by
1.17.0