Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_SwitchFlashlightLensAction.c
Go to the documentation of this file.
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
7
8 //------------------------------------------------------------------------------------------------
9 override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
10 {
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 {
32 return;
33
34 m_FlashlightComp.CycleThroughLenses(m_bCycleDirection);
35 }
36}
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external IEntity GetOwner()
Returns the parent entity of this action.
proto external Managed FindComponent(typename typeName)
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
SCR_FieldOfViewSettings Attribute