Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SCR_GadgetComponent Interface Reference

Gadget base class. More...

Inheritance diagram for SCR_GadgetComponent:
[legend]

Public Member Functions

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)
 

Public Attributes

bool m_bFocused
 

Protected Member Functions

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 ()
 
- Protected Member Functions inherited from ScriptGameComponent
bool OnTicksOnRemoteProxy ()
 

Protected Attributes

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
 

Detailed Description

Gadget base class.

Member Function Documentation

◆ ActivateAction()

void SCR_GadgetComponent.ActivateAction ( )

Action listener callback.

Implemented in SCR_ConsumableItemComponent, SCR_DetonatorGadgetComponent, and SCR_FlashlightComponent.

◆ ActivateGadgetUpdate()

void SCR_GadgetComponent.ActivateGadgetUpdate ( )

◆ CanBeHeld()

bool SCR_GadgetComponent.CanBeHeld ( )

Can be held in hand.

Returns
Returns true if heldable

Implemented in SCR_RadioComponent.

◆ CanBeRaised()

bool SCR_GadgetComponent.CanBeRaised ( )

Gadget has a raised animation version.

Returns
Returns true if raisable

Implemented in SCR_BinocularsComponent, SCR_CompassComponent, SCR_DetonatorGadgetComponent, and SCR_WristwatchComponent.

◆ ConnectToGadgetsSystem()

void SCR_GadgetComponent.ConnectToGadgetsSystem ( )
protected

Starts on frame update event.

◆ DeactivateGadgetUpdate()

void SCR_GadgetComponent.DeactivateGadgetUpdate ( )

◆ DisconnectFromGadgetsSystem()

void SCR_GadgetComponent.DisconnectFromGadgetsSystem ( )
protected

◆ GetAnimVariable()

EGadgetAnimVariable SCR_GadgetComponent.GetAnimVariable ( )
Returns

◆ GetCharacterOwner()

ChimeraCharacter SCR_GadgetComponent.GetCharacterOwner ( )

Get IEntity in possession of this Gadget.

Returns
returns entity m_CharacterOwner

◆ GetMode()

EGadgetMode SCR_GadgetComponent.GetMode ( )

Get gadget mode.

Returns
Returns gadget mode

◆ GetType()

EGadgetType SCR_GadgetComponent.GetType ( )

◆ GetUseMask()

SCR_EUseContext SCR_GadgetComponent.GetUseMask ( )

Provides value that contains mask of contexts from which this gadget can be toggled.

Returns
Returns int mask of SCR_EUseContext

◆ GetWeaponNoFireTime()

float SCR_GadgetComponent.GetWeaponNoFireTime ( )
Returns

◆ IsToggledOn()

bool SCR_GadgetComponent.IsToggledOn ( )

Is gadget toggled on/off.

Returns
current state on/off

◆ IsUsingADSControls()

bool SCR_GadgetComponent.IsUsingADSControls ( )

Gadget uses ADS controls from gadget raisable context.

Returns
Returns true if using the controls

Implemented in SCR_BinocularsComponent, SCR_CompassComponent, and SCR_WristwatchComponent.

◆ IsVisibleEquipped()

bool SCR_GadgetComponent.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

Implemented in SCR_BinocularsComponent, SCR_ConsumableItemComponent, SCR_FlashlightComponent, and SCR_RadioComponent.

◆ ModeClear()

void SCR_GadgetComponent.ModeClear ( EGadgetMode  mode)
protected

◆ ModeSwitch()

void SCR_GadgetComponent.ModeSwitch ( EGadgetMode  mode,
IEntity  charOwner 
)
protected

◆ OnDelete()

override void SCR_GadgetComponent.OnDelete ( IEntity  owner)

◆ OnModeChanged()

void SCR_GadgetComponent.OnModeChanged ( EGadgetMode  mode,
IEntity  charOwner 
)

Gadget mode change event.

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

◆ OnParentSlotChanged()

void SCR_GadgetComponent.OnParentSlotChanged ( InventoryStorageSlot  oldSlot,
InventoryStorageSlot  newSlot 
)

◆ OnPostInit()

override void SCR_GadgetComponent.OnPostInit ( IEntity  owner)

◆ OnSlotOccludedStateChanged()

void SCR_GadgetComponent.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

Implemented in SCR_FlashlightComponent.

◆ OnToggleActive()

void SCR_GadgetComponent.OnToggleActive ( bool  state)

Event called from SCR_GadgetManagerComponent through RPC request.

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

Implemented in SCR_CampaignBuildingGadgetToolComponent, SCR_DetonatorGadgetComponent, and SCR_FlashlightComponent.

◆ RplLoad()

override bool SCR_GadgetComponent.RplLoad ( ScriptBitReader  reader)

◆ RplSave()

override bool SCR_GadgetComponent.RplSave ( ScriptBitWriter  writer)

◆ ToggleActive()

void SCR_GadgetComponent.ToggleActive ( bool  state,
SCR_EUseContext  context 
)

Synchronise gadget state.

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

Implemented in SCR_DetonatorGadgetComponent, and SCR_FlashlightComponent.

◆ ToggleFocused()

void SCR_GadgetComponent.ToggleFocused ( bool  enable)

Toggle gadget focus state.

Parameters
[in]enableis target state

Implemented in SCR_BinocularsComponent, and SCR_MapGadgetComponent.

◆ Update()

void SCR_GadgetComponent.Update ( float  timeSlice)

◆ UpdateVisibility()

void SCR_GadgetComponent.UpdateVisibility ( EGadgetMode  mode)

Set visibility when show/hide hand animation starts/finishes.

Implemented in SCR_RadioComponent.

Member Data Documentation

◆ m_bActivated

bool SCR_GadgetComponent.m_bActivated = false
protected

◆ m_bFocused

bool SCR_GadgetComponent.m_bFocused

◆ m_CharacterOwner

ChimeraCharacter SCR_GadgetComponent.m_CharacterOwner
protected

◆ m_eAnimVariable

EGadgetAnimVariable SCR_GadgetComponent.m_eAnimVariable
protected

◆ m_eUseMask

SCR_EUseContext SCR_GadgetComponent.m_eUseMask
protected

◆ m_fWeaponNoFireTime

float SCR_GadgetComponent.m_fWeaponNoFireTime
protected

◆ m_iMode

EGadgetMode SCR_GadgetComponent.m_iMode = EGadgetMode.ON_GROUND
protected

◆ m_vEquipmentSlotOffset

vector SCR_GadgetComponent.m_vEquipmentSlotOffset
protected

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