Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SCR_FlashlightComponent Interface Reference
Inheritance diagram for SCR_FlashlightComponent:
[legend]

Public Member Functions

override void OnToggleActive (bool state)
 Event called from SCR_GadgetManagerComponent through RPC request.
 
int GetNumberOfAvailableLenses ()
 
void CycleThroughLenses (bool direction)
 Cycle through all available lenses.
 
override void OnSlotOccludedStateChanged (bool occluded)
 Method called when slot to which item is attached to changed its occlusion state.
 
override void ActivateAction ()
 Action listener callback.
 
override EGadgetType GetType ()
 Get gadget type.
 
override bool IsVisibleEquipped ()
 Visible when attached to character gear, further condition may determine visibility, such as if the equipment slot is obstructed by something else.
 
override bool RplSave (ScriptBitWriter writer)
 
override bool RplLoad (ScriptBitReader reader)
 
override bool OnTicksOnRemoteProxy ()
 
override void Update (float timeSlice)
 
override void EOnInit (IEntity owner)
 
- Public Member Functions inherited from SCR_GadgetComponent
EGadgetAnimVariable GetAnimVariable ()
 
float GetWeaponNoFireTime ()
 
bool IsToggledOn ()
 Is gadget toggled on/off.
 
void OnToggleActive (bool state)
 Event called from SCR_GadgetManagerComponent through RPC request.
 
void OnParentSlotChanged (InventoryStorageSlot oldSlot, InventoryStorageSlot newSlot)
 InventoryItemComponent event.
 
void OnModeChanged (EGadgetMode mode, IEntity charOwner)
 Gadget mode change event.
 
void OnSlotOccludedStateChanged (bool occluded)
 Method called when slot to which item is attached to changed its occlusion state.
 
void ActivateGadgetUpdate ()
 Activate gadget frame update.
 
void DeactivateGadgetUpdate ()
 Deactivate gadget frame flag.
 
void UpdateVisibility (EGadgetMode mode)
 Set visibility when show/hide hand animation starts/finishes.
 
void ToggleActive (bool state, SCR_EUseContext context)
 Synchronise gadget state.
 
void ActivateAction ()
 Action listener callback.
 
void ToggleFocused (bool enable)
 Toggle gadget focus state.
 
ChimeraCharacter GetCharacterOwner ()
 Get IEntity in possession of this Gadget.
 
EGadgetType GetType ()
 Get gadget type.
 
EGadgetMode GetMode ()
 Get gadget mode.
 
bool CanBeHeld ()
 Can be held in hand.
 
SCR_EUseContext GetUseMask ()
 Provides value that contains mask of contexts from which this gadget can be toggled.
 
bool CanBeRaised ()
 Gadget has a raised animation version.
 
bool IsUsingADSControls ()
 Gadget uses ADS controls from gadget raisable context.
 
bool IsVisibleEquipped ()
 Visible when attached to character gear, further condition may determine visibility, such as if the equipment slot is obstructed by something else.
 
void Update (float timeSlice)
 
override bool RplSave (ScriptBitWriter writer)
 
override bool RplLoad (ScriptBitReader reader)
 
override void OnDelete (IEntity owner)
 
override void OnPostInit (IEntity owner)
 

Protected Member Functions

void UpdateLightState ()
 Update state of light ON/OFF.
 
void SwitchLenses (int filter)
 Switch flashlight lenses.
 
void EnableLight ()
 Spawn light entity.
 
void DisableLight ()
 Remove light.
 
void SetShadowNearPlane (bool state, bool isLeavingVehicle=false)
 Set near plane of light shadow to avoid blocking the light with arm/weapon.
 
void AdjustTransform (vector offset=vector.Zero)
 
void OnOwnerLifeStateChanged (ECharacterLifeState previousLifeState, ECharacterLifeState newLifeState)
 SCR_CompartmentAccessComponent event.
 
void OnCompartmentEntered (IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 SCR_CompartmentAccessComponent event.
 
void OnCompartmentLeft (IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 SCR_CompartmentAccessComponent event.
 
override void ModeSwitch (EGadgetMode mode, IEntity charOwner)
 Set gadget mode.
 
override void ModeClear (EGadgetMode mode)
 Clear gadget mode.
 
override void ToggleActive (bool state, SCR_EUseContext context)
 Synchronise gadget state.
 
override void ActivateGadgetUpdate ()
 Activate gadget frame update.
 
override void DeactivateGadgetUpdate ()
 Deactivate gadget frame flag.
 
- Protected Member Functions inherited from SCR_GadgetComponent
void ModeSwitch (EGadgetMode mode, IEntity charOwner)
 Set gadget mode.
 
void ModeClear (EGadgetMode mode)
 Clear gadget mode.
 
void ConnectToGadgetsSystem ()
 Starts on frame update event.
 
void DisconnectFromGadgetsSystem ()
 
bool OnTicksOnRemoteProxy ()
 

Protected Attributes

float m_fEmissiveIntensity
 
ref array< ref SCR_LenseColorm_aLenseArray
 
float m_fLightNearPlaneHand
 
float m_fLightNearPlaneStrapped
 
float m_fLightNearPlaneVehicle
 
vector m_vFlashlightAdjustOffset
 
bool m_bLastLightState
 
bool m_bIsSlottedVehicle
 
bool m_bIsOccluded
 
int m_iCurrentLenseColor
 
vector m_vAnglesCurrent
 
vector m_vAnglesTarget
 
vector m_ItemMat [4]
 
LightEntity m_Light
 
ParametricMaterialInstanceComponent m_EmissiveMaterial
 
SCR_CompartmentAccessComponent m_CompartmentComp
 
SCR_CharacterControllerComponent m_CharController
 
- Protected Attributes inherited from SCR_GadgetComponent
EGadgetAnimVariable m_eAnimVariable
 
SCR_EUseContext m_eUseMask
 
vector m_vEquipmentSlotOffset
 
float m_fWeaponNoFireTime
 
bool m_bActivated = false
 
EGadgetMode m_iMode = EGadgetMode.ON_GROUND
 
ChimeraCharacter m_CharacterOwner
 

Additional Inherited Members

- Public Attributes inherited from SCR_GadgetComponent
bool m_bFocused
 

Member Function Documentation

◆ ActivateAction()

override void SCR_FlashlightComponent.ActivateAction ( )

Action listener callback.

Implements SCR_GadgetComponent.

◆ ActivateGadgetUpdate()

override void SCR_FlashlightComponent.ActivateGadgetUpdate ( )
protected

Activate gadget frame update.

Implements SCR_GadgetComponent.

◆ AdjustTransform()

void SCR_FlashlightComponent.AdjustTransform ( vector  offset = vector::Zero)
protected

◆ CycleThroughLenses()

void SCR_FlashlightComponent.CycleThroughLenses ( bool  direction)

Cycle through all available lenses.

Parameters
[in]directiondecides whether it will switch to next (true) / previous (false) lens color

◆ DeactivateGadgetUpdate()

override void SCR_FlashlightComponent.DeactivateGadgetUpdate ( )
protected

Deactivate gadget frame flag.

Implements SCR_GadgetComponent.

◆ DisableLight()

void SCR_FlashlightComponent.DisableLight ( )
protected

Remove light.

◆ EnableLight()

void SCR_FlashlightComponent.EnableLight ( )
protected

Spawn light entity.

◆ EOnInit()

override void SCR_FlashlightComponent.EOnInit ( IEntity  owner)

◆ GetNumberOfAvailableLenses()

int SCR_FlashlightComponent.GetNumberOfAvailableLenses ( )
Returns

◆ GetType()

override EGadgetType SCR_FlashlightComponent.GetType ( )

Get gadget type.

Returns
Returns gadget type

Implements SCR_GadgetComponent.

◆ IsVisibleEquipped()

override bool SCR_FlashlightComponent.IsVisibleEquipped ( )

Visible when attached to character gear, further condition may determine visibility, such as if the equipment slot is obstructed by something else.

Returns
Returns true if visible in equipment slot

Implements SCR_GadgetComponent.

◆ ModeClear()

override void SCR_FlashlightComponent.ModeClear ( EGadgetMode  mode)
protected

Clear gadget mode.

Parameters
[in]modeis the mode being cleared

Implements SCR_GadgetComponent.

◆ ModeSwitch()

override void SCR_FlashlightComponent.ModeSwitch ( EGadgetMode  mode,
IEntity  charOwner 
)
protected

Set gadget mode.

Parameters
[in]modeis the target mode being switched to
[in]charOwner

Implements SCR_GadgetComponent.

◆ OnCompartmentEntered()

void SCR_FlashlightComponent.OnCompartmentEntered ( IEntity  targetEntity,
BaseCompartmentManagerComponent  manager,
int  mgrID,
int  slotID,
bool  move 
)
protected

◆ OnCompartmentLeft()

void SCR_FlashlightComponent.OnCompartmentLeft ( IEntity  targetEntity,
BaseCompartmentManagerComponent  manager,
int  mgrID,
int  slotID,
bool  move 
)
protected

◆ OnOwnerLifeStateChanged()

void SCR_FlashlightComponent.OnOwnerLifeStateChanged ( ECharacterLifeState  previousLifeState,
ECharacterLifeState  newLifeState 
)
protected

◆ OnSlotOccludedStateChanged()

override void SCR_FlashlightComponent.OnSlotOccludedStateChanged ( bool  occluded)

Method called when slot to which item is attached to changed its occlusion state.

Parameters
[in]occludedif parent slot is now occluded or not

Implements SCR_GadgetComponent.

◆ OnTicksOnRemoteProxy()

override bool SCR_FlashlightComponent.OnTicksOnRemoteProxy ( )

Implements ScriptGameComponent.

◆ OnToggleActive()

override void SCR_FlashlightComponent.OnToggleActive ( bool  state)

Event called from SCR_GadgetManagerComponent through RPC request.

Parameters
[in]stateis gadget state: true - active / false - inactive

Implements SCR_GadgetComponent.

◆ RplLoad()

override bool SCR_FlashlightComponent.RplLoad ( ScriptBitReader  reader)

Implements SCR_GadgetComponent.

◆ RplSave()

override bool SCR_FlashlightComponent.RplSave ( ScriptBitWriter  writer)

Implements SCR_GadgetComponent.

◆ SetShadowNearPlane()

void SCR_FlashlightComponent.SetShadowNearPlane ( bool  state,
bool  isLeavingVehicle = false 
)
protected

Set near plane of light shadow to avoid blocking the light with arm/weapon.

Parameters
[in]statedetermines mode: false - in hand / true - strapped
[in]isLeavingVehicleis signal for removing vehicle near plane mode

◆ SwitchLenses()

void SCR_FlashlightComponent.SwitchLenses ( int  filter)
protected

Switch flashlight lenses.

Parameters
[in]filter

◆ ToggleActive()

override void SCR_FlashlightComponent.ToggleActive ( bool  state,
SCR_EUseContext  context 
)
protected

Synchronise gadget state.

Parameters
[in]stateis target state true = active, false = inactive

Implements SCR_GadgetComponent.

◆ Update()

override void SCR_FlashlightComponent.Update ( float  timeSlice)
Parameters
[in]timeSlice

Implements SCR_GadgetComponent.

◆ UpdateLightState()

void SCR_FlashlightComponent.UpdateLightState ( )
protected

Update state of light ON/OFF.

Member Data Documentation

◆ m_aLenseArray

ref array<ref SCR_LenseColor> SCR_FlashlightComponent.m_aLenseArray
protected

◆ m_bIsOccluded

bool SCR_FlashlightComponent.m_bIsOccluded
protected

◆ m_bIsSlottedVehicle

bool SCR_FlashlightComponent.m_bIsSlottedVehicle
protected

◆ m_bLastLightState

bool SCR_FlashlightComponent.m_bLastLightState
protected

◆ m_CharController

SCR_CharacterControllerComponent SCR_FlashlightComponent.m_CharController
protected

◆ m_CompartmentComp

SCR_CompartmentAccessComponent SCR_FlashlightComponent.m_CompartmentComp
protected

◆ m_EmissiveMaterial

ParametricMaterialInstanceComponent SCR_FlashlightComponent.m_EmissiveMaterial
protected

◆ m_fEmissiveIntensity

float SCR_FlashlightComponent.m_fEmissiveIntensity
protected

◆ m_fLightNearPlaneHand

float SCR_FlashlightComponent.m_fLightNearPlaneHand
protected

◆ m_fLightNearPlaneStrapped

float SCR_FlashlightComponent.m_fLightNearPlaneStrapped
protected

◆ m_fLightNearPlaneVehicle

float SCR_FlashlightComponent.m_fLightNearPlaneVehicle
protected

◆ m_iCurrentLenseColor

int SCR_FlashlightComponent.m_iCurrentLenseColor
protected

◆ m_ItemMat

vector SCR_FlashlightComponent.m_ItemMat[4]
protected

◆ m_Light

LightEntity SCR_FlashlightComponent.m_Light
protected

◆ m_vAnglesCurrent

vector SCR_FlashlightComponent.m_vAnglesCurrent
protected

◆ m_vAnglesTarget

vector SCR_FlashlightComponent.m_vAnglesTarget
protected

◆ m_vFlashlightAdjustOffset

vector SCR_FlashlightComponent.m_vFlashlightAdjustOffset
protected

The documentation for this interface was generated from the following file: