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

Public Member Functions

int GetNumberOfConnectedCharges ()
 
array< RplId > GetConnectedCharges ()
 
bool IsAttachedToTheDetonator (SCR_ExplosiveChargeComponent explosiveChargeComp)
 
bool IsAttachedToTheDetonator (RplId explosiveChargeCompId)
 
bool IsChargeInRange (vector pos, SCR_ExplosiveChargeComponent explosiveChargeComp)
 Validates if provided charge is on the list and in usable range of that detonator.
 
bool IsChargeInRange (vector pos, RplId explosiveChargeCompId)
 Validates if provided charge is on the list and in usable range of that detonator.
 
override void ToggleActive (bool state, SCR_EUseContext context)
 Synchronise gadget state.
 
override void OnToggleActive (bool state)
 Event called from SCR_GadgetManagerComponent through RPC request.
 
void ActivateAction (notnull IEntity pUserEntity)
 Method meant for client side triggering of the action from outside of the gadget toggle mechanic.
 
void ConnectNewCharge (RplId explosiveChargeCompId, bool shouldReplicate=true)
 Add new charge to the list of connected charges.
 
void RemoveChargeFromTheList (RplId chargeCompToDisconnect, bool shouldReplicate=true)
 Remove provided charge from the listed of connected charges.
 
void ReplaceChargeFromTheList (RplId chargeCompToReplace, RplId replaceWith=RplId.Invalid())
 Removes replaced trigger id and appends in its place provided replacement while preventing addition of the same RplId indefinitely.
 
void RemoveAllChargesFromTheList ()
 Remove all charges from the listed of connected charges.
 
override EGadgetType GetType ()
 Get gadget type.
 
override bool CanBeRaised ()
 Gadget has a raised animation version.
 
override void ActivateGadgetUpdate ()
 Activate gadget frame update.
 
override void DeactivateGadgetUpdate ()
 Deactivate gadget frame flag.
 
override void Update (float timeSlice)
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 
override bool RplSave (ScriptBitWriter writer)
 
override bool RplLoad (ScriptBitReader reader)
 
- 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.
 
IEntity 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 OnNumberOfConnectedChargesChanged ()
 
void OnAnimationEvent (AnimationEventID animEventType, AnimationEventID animUserString, int intParam, float timeFromStart, float timeToEnd)
 Callback called when animation event happens.
 
void OnAnimationEnded (IEntity item, bool successful, ItemUseParameters animParams)
 Callback called when animation of using the item ends.
 
void DetonateExplosiveCharge ()
 Trigger detonation of explosive charge if there is some connected and in range.
 
override void ActivateAction ()
 Action listener callback.
 
void PlaySound (string soundName)
 Play local sound from this entity.
 
void UpdateWiresVisibility (bool visible=false)
 Change visibility of sloted wires.
 
void ShowConnectedWiresForChargesInRange ()
 Checks if there are any charges in range and if so then will show connected wires.
 
void OnDeployedStateChanged (bool deployed)
 
override void ModeSwitch (EGadgetMode mode, IEntity charOwner)
 Set gadget mode.
 
override void ModeClear (EGadgetMode mode)
 Clear gadget mode.
 
- 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 ()
 
- Protected Member Functions inherited from ScriptGameComponent
bool OnTicksOnRemoteProxy ()
 

Protected Attributes

float m_fMaxDetonationRange
 
int m_iNumberOfConnectedCharges
 
ref array< RplId > m_aConnectedCharges = {}
 
float m_fVisibilityCheckDelay
 
RplComponent m_RplComp
 
ChimeraCharacter m_User
 
AnimationEventID m_iDetonatorTriggeredEventID = -1
 
- 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
 
IEntity m_CharacterOwner
 

Static Protected Attributes

const string TRIGGER_ANIMATION_EVENT_NAME = "DetonatorTriggered"
 
const string ANIMATION_BIND_COMMAND = "CMD_Item_Action"
 
const int UPDATE_WIRES_VISIBILITY_DELAY = 500
 

Additional Inherited Members

- Public Attributes inherited from SCR_GadgetComponent
bool m_bFocused
 

Member Function Documentation

◆ ActivateAction() [1/2]

override void SCR_DetonatorGadgetComponent.ActivateAction ( )
protected

Action listener callback.

Implements SCR_GadgetComponent.

◆ ActivateAction() [2/2]

void SCR_DetonatorGadgetComponent.ActivateAction ( notnull IEntity  pUserEntity)

Method meant for client side triggering of the action from outside of the gadget toggle mechanic.

◆ ActivateGadgetUpdate()

override void SCR_DetonatorGadgetComponent.ActivateGadgetUpdate ( )

Activate gadget frame update.

Implements SCR_GadgetComponent.

◆ CanBeRaised()

override bool SCR_DetonatorGadgetComponent.CanBeRaised ( )

Gadget has a raised animation version.

Returns
Returns true if raisable

Implements SCR_GadgetComponent.

◆ ConnectNewCharge()

void SCR_DetonatorGadgetComponent.ConnectNewCharge ( RplId  explosiveChargeCompId,
bool  shouldReplicate = true 
)

Add new charge to the list of connected charges.

◆ DeactivateGadgetUpdate()

override void SCR_DetonatorGadgetComponent.DeactivateGadgetUpdate ( )

Deactivate gadget frame flag.

Implements SCR_GadgetComponent.

◆ DetonateExplosiveCharge()

void SCR_DetonatorGadgetComponent.DetonateExplosiveCharge ( )
protected

Trigger detonation of explosive charge if there is some connected and in range.

◆ EOnInit()

override void SCR_DetonatorGadgetComponent.EOnInit ( IEntity  owner)

◆ GetConnectedCharges()

array< RplId > SCR_DetonatorGadgetComponent.GetConnectedCharges ( )
Returns

◆ GetNumberOfConnectedCharges()

int SCR_DetonatorGadgetComponent.GetNumberOfConnectedCharges ( )
Returns

◆ GetType()

override EGadgetType SCR_DetonatorGadgetComponent.GetType ( )

Get gadget type.

Returns
Returns gadget type

Implements SCR_GadgetComponent.

◆ IsAttachedToTheDetonator() [1/2]

bool SCR_DetonatorGadgetComponent.IsAttachedToTheDetonator ( RplId  explosiveChargeCompId)
Parameters
[in]explosiveChargeCompId
Returns

◆ IsAttachedToTheDetonator() [2/2]

bool SCR_DetonatorGadgetComponent.IsAttachedToTheDetonator ( SCR_ExplosiveChargeComponent  explosiveChargeComp)
Parameters
[in]explosiveChargeComp
Returns

◆ IsChargeInRange() [1/2]

bool SCR_DetonatorGadgetComponent.IsChargeInRange ( vector  pos,
RplId  explosiveChargeCompId 
)

Validates if provided charge is on the list and in usable range of that detonator.

Parameters
[in]posposition from which distance will be measured
[in]explosiveChargeCompIdreplication id of the explosive charge component of the object to which distance will be checked
Returns
true if explosive charge can be detonated from that position in case that detonators' range is set to -1 then it will always be true

◆ IsChargeInRange() [2/2]

bool SCR_DetonatorGadgetComponent.IsChargeInRange ( vector  pos,
SCR_ExplosiveChargeComponent  explosiveChargeComp 
)

Validates if provided charge is on the list and in usable range of that detonator.

Parameters
[in]posposition from which distance will be measured
[in]explosiveChargeCompexplosive charge component of the object to which distance will be checked
Returns
true if explosive charge can be detonated from that position in case that detonators' range is set to -1 then it will always be true

◆ ModeClear()

override void SCR_DetonatorGadgetComponent.ModeClear ( EGadgetMode  mode)
protected

Clear gadget mode.

Parameters
[in]modeis the mode being cleared

Implements SCR_GadgetComponent.

◆ ModeSwitch()

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

Set gadget mode.

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

Implements SCR_GadgetComponent.

◆ OnAnimationEnded()

void SCR_DetonatorGadgetComponent.OnAnimationEnded ( IEntity  item,
bool  successful,
ItemUseParameters  animParams 
)
protected

Callback called when animation of using the item ends.

Parameters
[in]itemanimated item
[in]successfulif animation was able to finish or was interrupted
[in]animParamsparameters that were used to play this animation

◆ OnAnimationEvent()

void SCR_DetonatorGadgetComponent.OnAnimationEvent ( AnimationEventID  animEventType,
AnimationEventID  animUserString,
int  intParam,
float  timeFromStart,
float  timeToEnd 
)
protected

Callback called when animation event happens.

Parameters
[in]animEventTypeID of animation event.
[in]animUserStringString parameter of animation event
[in]intParamint parameter of animation event
[in]timeFromStarttime from Start of animation event
[in]timeToEndtime to end of animation event

◆ OnDeployedStateChanged()

void SCR_DetonatorGadgetComponent.OnDeployedStateChanged ( bool  deployed)
protected
Parameters
[in]deployed

◆ OnNumberOfConnectedChargesChanged()

void SCR_DetonatorGadgetComponent.OnNumberOfConnectedChargesChanged ( )
protected

◆ OnPostInit()

override void SCR_DetonatorGadgetComponent.OnPostInit ( IEntity  owner)

Implements SCR_GadgetComponent.

◆ OnToggleActive()

override void SCR_DetonatorGadgetComponent.OnToggleActive ( bool  state)

Event called from SCR_GadgetManagerComponent through RPC request.

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

Implements SCR_GadgetComponent.

◆ PlaySound()

void SCR_DetonatorGadgetComponent.PlaySound ( string  soundName)
protected

Play local sound from this entity.

Parameters
[in]soundName

◆ RemoveAllChargesFromTheList()

void SCR_DetonatorGadgetComponent.RemoveAllChargesFromTheList ( )

Remove all charges from the listed of connected charges.

◆ RemoveChargeFromTheList()

void SCR_DetonatorGadgetComponent.RemoveChargeFromTheList ( RplId  chargeCompToDisconnect,
bool  shouldReplicate = true 
)

Remove provided charge from the listed of connected charges.

◆ ReplaceChargeFromTheList()

void SCR_DetonatorGadgetComponent.ReplaceChargeFromTheList ( RplId  chargeCompToReplace,
RplId  replaceWith = RplId::Invalid() 
)

Removes replaced trigger id and appends in its place provided replacement while preventing addition of the same RplId indefinitely.

◆ RplLoad()

override bool SCR_DetonatorGadgetComponent.RplLoad ( ScriptBitReader  reader)

Implements SCR_GadgetComponent.

◆ RplSave()

override bool SCR_DetonatorGadgetComponent.RplSave ( ScriptBitWriter  writer)

Implements SCR_GadgetComponent.

◆ ShowConnectedWiresForChargesInRange()

void SCR_DetonatorGadgetComponent.ShowConnectedWiresForChargesInRange ( )
protected

Checks if there are any charges in range and if so then will show connected wires.

◆ ToggleActive()

override void SCR_DetonatorGadgetComponent.ToggleActive ( bool  state,
SCR_EUseContext  context 
)

Synchronise gadget state.

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

Implements SCR_GadgetComponent.

◆ Update()

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

Implements SCR_GadgetComponent.

◆ UpdateWiresVisibility()

void SCR_DetonatorGadgetComponent.UpdateWiresVisibility ( bool  visible = false)
protected

Change visibility of sloted wires.

Member Data Documentation

◆ ANIMATION_BIND_COMMAND

const string SCR_DetonatorGadgetComponent.ANIMATION_BIND_COMMAND = "CMD_Item_Action"
staticprotected

◆ m_aConnectedCharges

ref array<RplId> SCR_DetonatorGadgetComponent.m_aConnectedCharges = {}
protected

◆ m_fMaxDetonationRange

float SCR_DetonatorGadgetComponent.m_fMaxDetonationRange
protected

◆ m_fVisibilityCheckDelay

float SCR_DetonatorGadgetComponent.m_fVisibilityCheckDelay
protected

◆ m_iDetonatorTriggeredEventID

AnimationEventID SCR_DetonatorGadgetComponent.m_iDetonatorTriggeredEventID = -1
protected

◆ m_iNumberOfConnectedCharges

int SCR_DetonatorGadgetComponent.m_iNumberOfConnectedCharges
protected

◆ m_RplComp

RplComponent SCR_DetonatorGadgetComponent.m_RplComp
protected

◆ m_User

ChimeraCharacter SCR_DetonatorGadgetComponent.m_User
protected

◆ TRIGGER_ANIMATION_EVENT_NAME

const string SCR_DetonatorGadgetComponent.TRIGGER_ANIMATION_EVENT_NAME = "DetonatorTriggered"
staticprotected

◆ UPDATE_WIRES_VISIBILITY_DELAY

const int SCR_DetonatorGadgetComponent.UPDATE_WIRES_VISIBILITY_DELAY = 500
staticprotected

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