Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_ExplosiveChargeComponent Interface Reference
Inheritance diagram for SCR_ExplosiveChargeComponent:
ScriptGameComponent

Public Member Functions

ScriptInvokerFuzeChanged GetOnFuzeChanged ()
 Script invoker that is triggered each time that fuze type chages for this entity This invoker is also called when this entity is deleted like in case when its detonated In such case its new fuze type will be NONE and such case can be recognized using IEntity.IsDeleted()
 
void OnFuzeTypeChanged ()
 
void OnArrayOfConnectedDetonatorsChanged ()
 
float GetTimeOfDetonation ()
 
SCR_EFuzeType GetUsedFuzeType ()
 
SCR_ExplosiveTriggerComponent GetTrigger ()
 
array< RplId > GetConnectedDetonators ()
 
int GetNumberOfConnectedDetonators ()
 
bool IsDetonatorConnected (RplId detonatorId)
 
float GetFuzeTime ()
 
void SetFuzeTime (float fuzeDelay, bool silent=false)
 Change the time which will be used for timed fuze.
 
void ArmWithTimedFuze (bool silent=false)
 Arms the charge and starts the timer for the detonation.
 
void ConnectDetonator (SCR_EFuzeType fuzeType, RplId detonatorId=RplId.Invalid(), bool shouldReplicate=true, bool silent=false)
 Arms the charge with remotely detonated fuze.
 
void RemoveDetonatorFromTheList (RplId detonatorId, bool shouldReplicate=true)
 Removes provided detonator RplId unless its not there in the first place.
 
void ReplaceDetonatorFromTheList (RplId detonatorIdToReplace, RplId replaceWith=RplId.Invalid())
 Replaces connected detonator RplId with provided id which by default will be invalid.
 
void DisarmChargeSilent ()
 Callback method to ensure that charge is disarmed when transferred but with no sound.
 
void DisarmCharge (bool playSound=true)
 Will clear the array of connected detonators, change fuze visibility and update their previously connected detonators with false info to not give players on the other end information that someone is tampering with their charges.
 
RplId GetRplId ()
 Checks validity and returns RplId of this component.
 
override void EOnFrame (IEntity owner, float timeSlice)
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 
override void OnDelete (IEntity owner)
 
override bool RplSave (ScriptBitWriter writer)
 
override bool RplLoad (ScriptBitReader reader)
 

Protected Member Functions

void OnFuzeChanged (SCR_EFuzeType oldFuzeType, SCR_EFuzeType newFuzeType)
 Triggers m_OnFuzeChanged when such exists with information about old and new fuze type.
 
void PlaySound (string soundName)
 
void SetGarbageCollectable (bool garbageCollectable)
 Changes if garbage system should manage this entity.
 
void UpdateFuzeVisibility ()
 Change visibility of sloted fuze.
 
void ChangeLockState (bool locked=false)
 When item is locked then players wont be able to pick it up.
 
bool CheckRplId ()
 Checks validaty of RplId and if that fails then tries to find correct RplId for that trigger.
 
- Protected Member Functions inherited from ScriptGameComponent
bool OnTicksOnRemoteProxy ()
 

Protected Attributes

RplId m_RplID
 
RplComponent m_RplComp
 
SCR_ExplosiveTriggerComponent m_Trigger
 
float m_fFuzeTime = 20
 
float m_fTimer
 
SCR_EFuzeType m_eUsedFuzeType = SCR_EFuzeType.NONE
 
ref array< RplId > m_aConnectedDetonators = {}
 
ref ScriptInvokerFuzeChanged m_OnFuzeChanged
 

Member Function Documentation

◆ ArmWithTimedFuze()

void SCR_ExplosiveChargeComponent.ArmWithTimedFuze ( bool silent = false)

Arms the charge and starts the timer for the detonation.

◆ ChangeLockState()

void SCR_ExplosiveChargeComponent.ChangeLockState ( bool locked = false)
protected

When item is locked then players wont be able to pick it up.

◆ CheckRplId()

bool SCR_ExplosiveChargeComponent.CheckRplId ( )
protected

Checks validaty of RplId and if that fails then tries to find correct RplId for that trigger.

◆ ConnectDetonator()

void SCR_ExplosiveChargeComponent.ConnectDetonator ( SCR_EFuzeType fuzeType,
RplId detonatorId = RplId::Invalid(),
bool shouldReplicate = true,
bool silent = false )

Arms the charge with remotely detonated fuze.

Adds provided detonator RplId unless its already on the list

◆ DisarmCharge()

void SCR_ExplosiveChargeComponent.DisarmCharge ( bool playSound = true)

Will clear the array of connected detonators, change fuze visibility and update their previously connected detonators with false info to not give players on the other end information that someone is tampering with their charges.

◆ DisarmChargeSilent()

void SCR_ExplosiveChargeComponent.DisarmChargeSilent ( )

Callback method to ensure that charge is disarmed when transferred but with no sound.

◆ EOnFrame()

override void SCR_ExplosiveChargeComponent.EOnFrame ( IEntity owner,
float timeSlice )

◆ EOnInit()

override void SCR_ExplosiveChargeComponent.EOnInit ( IEntity owner)

◆ GetConnectedDetonators()

array< RplId > SCR_ExplosiveChargeComponent.GetConnectedDetonators ( )

◆ GetFuzeTime()

float SCR_ExplosiveChargeComponent.GetFuzeTime ( )

◆ GetNumberOfConnectedDetonators()

int SCR_ExplosiveChargeComponent.GetNumberOfConnectedDetonators ( )

◆ GetOnFuzeChanged()

ScriptInvokerFuzeChanged SCR_ExplosiveChargeComponent.GetOnFuzeChanged ( )

Script invoker that is triggered each time that fuze type chages for this entity This invoker is also called when this entity is deleted like in case when its detonated In such case its new fuze type will be NONE and such case can be recognized using IEntity.IsDeleted()

◆ GetRplId()

RplId SCR_ExplosiveChargeComponent.GetRplId ( )

Checks validity and returns RplId of this component.

◆ GetTimeOfDetonation()

float SCR_ExplosiveChargeComponent.GetTimeOfDetonation ( )

◆ GetTrigger()

SCR_ExplosiveTriggerComponent SCR_ExplosiveChargeComponent.GetTrigger ( )

◆ GetUsedFuzeType()

SCR_EFuzeType SCR_ExplosiveChargeComponent.GetUsedFuzeType ( )

◆ IsDetonatorConnected()

bool SCR_ExplosiveChargeComponent.IsDetonatorConnected ( RplId detonatorId)

◆ OnArrayOfConnectedDetonatorsChanged()

void SCR_ExplosiveChargeComponent.OnArrayOfConnectedDetonatorsChanged ( )

◆ OnDelete()

override void SCR_ExplosiveChargeComponent.OnDelete ( IEntity owner)

◆ OnFuzeChanged()

void SCR_ExplosiveChargeComponent.OnFuzeChanged ( SCR_EFuzeType oldFuzeType,
SCR_EFuzeType newFuzeType )
protected

Triggers m_OnFuzeChanged when such exists with information about old and new fuze type.

◆ OnFuzeTypeChanged()

void SCR_ExplosiveChargeComponent.OnFuzeTypeChanged ( )

◆ OnPostInit()

override void SCR_ExplosiveChargeComponent.OnPostInit ( IEntity owner)

◆ PlaySound()

void SCR_ExplosiveChargeComponent.PlaySound ( string soundName)
protected

◆ RemoveDetonatorFromTheList()

void SCR_ExplosiveChargeComponent.RemoveDetonatorFromTheList ( RplId detonatorId,
bool shouldReplicate = true )

Removes provided detonator RplId unless its not there in the first place.

◆ ReplaceDetonatorFromTheList()

void SCR_ExplosiveChargeComponent.ReplaceDetonatorFromTheList ( RplId detonatorIdToReplace,
RplId replaceWith = RplId::Invalid() )

Replaces connected detonator RplId with provided id which by default will be invalid.

◆ RplLoad()

override bool SCR_ExplosiveChargeComponent.RplLoad ( ScriptBitReader reader)

◆ RplSave()

override bool SCR_ExplosiveChargeComponent.RplSave ( ScriptBitWriter writer)

◆ SetFuzeTime()

void SCR_ExplosiveChargeComponent.SetFuzeTime ( float fuzeDelay,
bool silent = false )

Change the time which will be used for timed fuze.

◆ SetGarbageCollectable()

void SCR_ExplosiveChargeComponent.SetGarbageCollectable ( bool garbageCollectable)
protected

Changes if garbage system should manage this entity.

Parameters
[in]garbageCollectabletrue if this entity should be inserted into garbage system

◆ UpdateFuzeVisibility()

void SCR_ExplosiveChargeComponent.UpdateFuzeVisibility ( )
protected

Change visibility of sloted fuze.

Member Data Documentation

◆ m_aConnectedDetonators

ref array<RplId> SCR_ExplosiveChargeComponent.m_aConnectedDetonators = {}
protected

◆ m_eUsedFuzeType

SCR_EFuzeType SCR_ExplosiveChargeComponent.m_eUsedFuzeType = SCR_EFuzeType.NONE
protected

◆ m_fFuzeTime

float SCR_ExplosiveChargeComponent.m_fFuzeTime = 20
protected

◆ m_fTimer

float SCR_ExplosiveChargeComponent.m_fTimer
protected

◆ m_OnFuzeChanged

ref ScriptInvokerFuzeChanged SCR_ExplosiveChargeComponent.m_OnFuzeChanged
protected

◆ m_RplComp

RplComponent SCR_ExplosiveChargeComponent.m_RplComp
protected

◆ m_RplID

RplId SCR_ExplosiveChargeComponent.m_RplID
protected

◆ m_Trigger

SCR_ExplosiveTriggerComponent SCR_ExplosiveChargeComponent.m_Trigger
protected

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