Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_MultiPartDeployableItemComponent Interface Reference
Inheritance diagram for SCR_MultiPartDeployableItemComponent:
SCR_BaseDeployableInventoryItemComponent

Public Member Functions

override array< ref WB_UIMenuItem > _WB_GetContextMenuItems (IEntity owner)
 
override void _WB_OnContextMenu (IEntity owner, int id)
 
void DrawBoundingBoxDebug (notnull IEntity owner)
 
override void _WB_AfterWorldUpdate (IEntity owner, float timeSlice)
 
bool IsUsingPartPositionAndRotation ()
 
vector GetAdditionaPlacementOffset ()
 
vector GetAdditionaPlacementRotation ()
 
bool GetFrontTowardPlayer ()
 
float GetReplacementPrefabHealthScaled ()
 
void SetReplacmentPrefabHealthScaled (float newHealthValue)
 0-1 scaled amount of health that replacement prefab will have upon deployment
 
bool FetchVariantData (int variant)
 Method used to find and cache the data about the variant.
 
void ClearCache ()
 Clears the information about currently handled variant.
 
int GetCurrentlyCachedVariantId ()
 
bool CheckSurfaceTilt (vector up, bool useDataFromOwnerPosition=false)
 Method used to check ground on the deployment position is not tilted too much for currently used variant.
 
bool FindRequiredElements (out string failReason, vector position=-vector.One)
 Method used to check if there are required partes within the area of deployment.
 
bool CheckAvailableSpace (inout vector transform[4], vector direction=vector.Zero, out LocalizedString reason=string.Empty)
 Method that is meant to be called by clients to check if there is enough space for deployed entity.
 
bool CheckIfPositionIsIndoors (inout vector transform[4])
 Method that is meant to be called by clients to check if spawn position will be under something.
 
void VisualizeReplacementEntity (inout vector transform[4], vector direction=vector.Zero)
 Creates or updates preview entity used by this deployable entity as a visualisation of final product.
 
void SetPreviewState (SCR_EPreviewState state)
 
bool FilterTracedEntities (notnull IEntity e, vector start="0 0 0", vector dir="0 0 0")
 Callback method used to filter out things that shouldnt prevent deployment.
 
void Deploy (int variantId, IEntity userEntity=null, vector direction=vector.Zero, bool reload=false, bool state=true)
 Gets called when deploy action is executed by player.
 
void SurfaceMonitoringInit (notnull IEntity surface)
 Method used to initialize monitoring of the surface on which this object was deployed.
 
void OnMonitoredSurfaceDamageStateChanged (SCR_HitZone damagedHitZone)
 Callback method used to update this entity when surface on which it was deployed changed its damage state.
 
void OnMonitoredSurfaceDismantled (bool newState, SCR_BaseDeployableInventoryItemComponent component)
 Callback method used to update this entity when surface on which it was deployed changed its deployment state.
 
void OnMonitoredSurfaceDeleted (IEntity deletedEntity)
 Callback method used to update this entity when surface on which it was deployed got deleted.
 
void DelayedDeletion ()
 Method used to delte this entity but after some delay to ensure that other logic can execute correctly especially for proxy.
 
- Public Member Functions inherited from SCR_BaseDeployableInventoryItemComponent
void SetDeploying (bool isDeploying)
 
bool IsDeploying ()
 
SCR_DeployableItemState GetOnDeployedStateChanged ()
 
void OnCompositionDestroyed (IEntity instigator)
 Callback method that is triggered when composition is destroyed.
 
void Deploy (IEntity userEntity=null, bool reload=false)
 Gets called when deploy action is executed by player.
 
void Dismantle (IEntity userEntity=null, bool reload=false)
 Gets called when dismantle action is executed by player.
 
void SetItemOwner (int playerId)
 
void Reload ()
 Dismantle and redeploy to update settings.
 
bool CanDeployBeShown (notnull IEntity userEntity)
 
bool CanDismantleBeShown (notnull IEntity userEntity)
 
bool IsDeployed ()
 
int GetItemOwnerID ()
 
override void OnPostInit (IEntity owner)
 

Static Public Member Functions

static void SetAuthor (notnull IEntity ent, int playerID)
 Method used to inform spawned entities about who is their author.
 
static void TryRemoveMagazineFromWeapons (notnull IEntity owner, notnull IEntity user)
 Method that attempts to remove any magazine from a weapon.
 
static void TryRemoveAllItemsFromStorage (notnull IEntity owner, notnull IEntity user)
 Method that attempts to remove all items stored by provided entity.
 

Protected Member Functions

bool EvaluateFoundEntity (IEntity ent)
 Callback method used to filter found elements and store all required parts.
 
void StopMonitoringSurface (IEntity ent, SCR_HitZone observedHitZone=null, SCR_BaseDeployableInventoryItemComponent deployableComp=null)
 Callback method used to update this entity when surface on which it was deployed changed its damage state.
 
void ExecuteObservationBehaviour (SCR_ESurfaceMonitoringBehaviour beaviour=-1)
 Method used to execute reactionary behaviour on the changes made to the surface on which this object was deployed.
 
void ComputeTransform (inout vector transform[4], vector direction)
 Transform to have the right direction.
 
void DeleteParts ()
 Method for deleting elements that are marked for Deletion If f.e.
 
void TransferDamageValues ()
 Method meant to be used to transfer information about health between this entity and deployed entity.
 
override void OnDelete (IEntity owner)
 
override void RPC_PlaySoundOnDeployBroadcast (bool deploy)
 
override bool RplSave (ScriptBitWriter writer)
 
override bool RplLoad (ScriptBitReader reader)
 
- Protected Member Functions inherited from SCR_BaseDeployableInventoryItemComponent
void RPC_SetTransformBroadcast (vector transform[4])
 
void OnRplDeployed ()
 

Protected Attributes

bool m_bFrontTowardPlayer
 
ref SCR_DeployableVariantContainer m_VariantContainer
 
ref array< ref SCR_RequiredDeployablePartm_aFoundElements
 
float m_fReplacementPrefabHealthScaled = 1
 
int m_iCurrentVariant = -1
 
- Protected Attributes inherited from SCR_BaseDeployableInventoryItemComponent
bool m_bEnableSounds
 
bool m_bDeleteWhenDestroyed
 
bool m_bIsDeployed
 
IEntity m_ReplacementEntity
 
vector m_aOriginalTransform [4]
 
RplComponent m_RplComponent
 
bool m_bIsDeploying
 
int m_iItemOwnerID
 
ref SCR_DeployableItemState m_OnDeployedStateChanged
 
bool m_bWasDeployed
 
IEntity m_PreviousOwner
 

Static Protected Attributes

static const LocalizedString SEARCH_FAIL_REASON_MISSING_PART = "#AR-UserAction_Assemble_MissingPart"
 
static const ResourceName CAN_BUILD_MATERIAL = "{56EBF5038622AC95}Assets/Conflict/CanBuild.emat"
 
static const ResourceName CANNOT_BUILD_MATERIAL = "{14A9DCEA57D1C381}Assets/Conflict/CannotBuild.emat"
 
static const ResourceName TRANSPARENT_MATERIAL = "{8FBC3A6E946F056E}Common/Materials/Default_Transparent.emat"
 
static const float MINOR_SAFETY_OFFSET = 0.05
 
static bool s_bShowBoundingBoxDebug
 

Member Function Documentation

◆ _WB_AfterWorldUpdate()

override void SCR_MultiPartDeployableItemComponent._WB_AfterWorldUpdate ( IEntity owner,
float timeSlice )

◆ _WB_GetContextMenuItems()

override array< ref WB_UIMenuItem > SCR_MultiPartDeployableItemComponent._WB_GetContextMenuItems ( IEntity owner)

◆ _WB_OnContextMenu()

override void SCR_MultiPartDeployableItemComponent._WB_OnContextMenu ( IEntity owner,
int id )

◆ CheckAvailableSpace()

bool SCR_MultiPartDeployableItemComponent.CheckAvailableSpace ( inout vector transform[4],
vector direction = vector::Zero,
out LocalizedString reason = string::Empty )

Method that is meant to be called by clients to check if there is enough space for deployed entity.

Parameters
[in,out]transformmatrix with position which is going to be checked - marked as inout as operations done on static arrays are done through the pointers thus will impact what is passed into the method
[in]directionin which spawned entity should be aligned to
[out]reasonof what is obstructing the space
Returns
true if there are no obstacles

◆ CheckIfPositionIsIndoors()

bool SCR_MultiPartDeployableItemComponent.CheckIfPositionIsIndoors ( inout vector transform[4])

Method that is meant to be called by clients to check if spawn position will be under something.

◆ CheckSurfaceTilt()

bool SCR_MultiPartDeployableItemComponent.CheckSurfaceTilt ( vector up,
bool useDataFromOwnerPosition = false )

Method used to check ground on the deployment position is not tilted too much for currently used variant.

Parameters
[in]upvector of the surface
[in]useDataFromOwnerPositionwhen ture, then value up is overriden by a result of a trace at the position of the owner of this component
Returns
true if tilt is within spec for current variant

◆ ClearCache()

void SCR_MultiPartDeployableItemComponent.ClearCache ( )

Clears the information about currently handled variant.

◆ ComputeTransform()

void SCR_MultiPartDeployableItemComponent.ComputeTransform ( inout vector transform[4],
vector direction )
protected

Transform to have the right direction.

Parameters
[in,out]transformmatrix with position - marked as inout as operations done on static arrays are done through the pointers thus will impact what is passed into the method
[in]directionin which spawned entity should be aligned to

◆ DelayedDeletion()

void SCR_MultiPartDeployableItemComponent.DelayedDeletion ( )

Method used to delte this entity but after some delay to ensure that other logic can execute correctly especially for proxy.

◆ DeleteParts()

void SCR_MultiPartDeployableItemComponent.DeleteParts ( )
protected

Method for deleting elements that are marked for Deletion If f.e.

you would want to get damage value of a tire to pass it to assembled entity (f.e. bicycle) then override this

◆ Deploy()

void SCR_MultiPartDeployableItemComponent.Deploy ( int variantId,
IEntity userEntity = null,
vector direction = vector::Zero,
bool reload = false,
bool state = true )

Gets called when deploy action is executed by player.

Parameters
[in]userEntityplayer who deployed it
[in]directionin which it should be deployed
[in]reload
[in]stateshould the resulting state be considered as deployed

◆ DrawBoundingBoxDebug()

void SCR_MultiPartDeployableItemComponent.DrawBoundingBoxDebug ( notnull IEntity owner)
Parameters
[in]owner

◆ EvaluateFoundEntity()

bool SCR_MultiPartDeployableItemComponent.EvaluateFoundEntity ( IEntity ent)
protected

Callback method used to filter found elements and store all required parts.

Parameters
[in]ententity that was found with the query
Returns
true if query should continue fetching more entities

◆ ExecuteObservationBehaviour()

void SCR_MultiPartDeployableItemComponent.ExecuteObservationBehaviour ( SCR_ESurfaceMonitoringBehaviour beaviour = -1)
protected

Method used to execute reactionary behaviour on the changes made to the surface on which this object was deployed.

Parameters
[in]beaviouroverride of the behaviour that was defined for this prefab

◆ FetchVariantData()

bool SCR_MultiPartDeployableItemComponent.FetchVariantData ( int variant)

Method used to find and cache the data about the variant.

Parameters
[int]variant id that is meant to be found
Returns
true if such variant was found, otherwise false

◆ FilterTracedEntities()

bool SCR_MultiPartDeployableItemComponent.FilterTracedEntities ( notnull IEntity e,
vector start = "0 0 0",
vector dir = "0 0 0" )

Callback method used to filter out things that shouldnt prevent deployment.

Parameters
[in]e
[in]start
[in]dir
Returns

◆ FindRequiredElements()

bool SCR_MultiPartDeployableItemComponent.FindRequiredElements ( out string failReason,
vector position = -vector::One )

Method used to check if there are required partes within the area of deployment.

Parameters
[out]failReasonstring containing the text about missing item with their name
[in]positionfrom which script will search for required elements. If position == -vector.One then owner origin will be used
Returns
true if all required elements were found

◆ GetAdditionaPlacementOffset()

vector SCR_MultiPartDeployableItemComponent.GetAdditionaPlacementOffset ( )
Returns

◆ GetAdditionaPlacementRotation()

vector SCR_MultiPartDeployableItemComponent.GetAdditionaPlacementRotation ( )
Returns

◆ GetCurrentlyCachedVariantId()

int SCR_MultiPartDeployableItemComponent.GetCurrentlyCachedVariantId ( )
Returns

◆ GetFrontTowardPlayer()

bool SCR_MultiPartDeployableItemComponent.GetFrontTowardPlayer ( )
Returns
true if forward vector should face toward the player

◆ GetReplacementPrefabHealthScaled()

float SCR_MultiPartDeployableItemComponent.GetReplacementPrefabHealthScaled ( )
Returns
0-1 scaled amount of health that replacement prefab will have upon deployment

◆ IsUsingPartPositionAndRotation()

bool SCR_MultiPartDeployableItemComponent.IsUsingPartPositionAndRotation ( )
Returns

◆ OnDelete()

override void SCR_MultiPartDeployableItemComponent.OnDelete ( IEntity owner)
protected

◆ OnMonitoredSurfaceDamageStateChanged()

void SCR_MultiPartDeployableItemComponent.OnMonitoredSurfaceDamageStateChanged ( SCR_HitZone damagedHitZone)

Callback method used to update this entity when surface on which it was deployed changed its damage state.

Parameters
[in]damagedHitZone

◆ OnMonitoredSurfaceDeleted()

void SCR_MultiPartDeployableItemComponent.OnMonitoredSurfaceDeleted ( IEntity deletedEntity)

Callback method used to update this entity when surface on which it was deployed got deleted.

Parameters
[in]deletedEntity

◆ OnMonitoredSurfaceDismantled()

void SCR_MultiPartDeployableItemComponent.OnMonitoredSurfaceDismantled ( bool newState,
SCR_BaseDeployableInventoryItemComponent component )

Callback method used to update this entity when surface on which it was deployed changed its deployment state.

Parameters
[in]newState
[in]component

◆ RPC_PlaySoundOnDeployBroadcast()

override void SCR_MultiPartDeployableItemComponent.RPC_PlaySoundOnDeployBroadcast ( bool deploy)
protected

◆ RplLoad()

override bool SCR_MultiPartDeployableItemComponent.RplLoad ( ScriptBitReader reader)
protected

◆ RplSave()

override bool SCR_MultiPartDeployableItemComponent.RplSave ( ScriptBitWriter writer)
protected

◆ SetAuthor()

static void SCR_MultiPartDeployableItemComponent.SetAuthor ( notnull IEntity ent,
int playerID )
static

Method used to inform spawned entities about who is their author.

Parameters
[in]ententity for which author will be set
[in]playerID

◆ SetPreviewState()

void SCR_MultiPartDeployableItemComponent.SetPreviewState ( SCR_EPreviewState state)
Parameters
[in]state

◆ SetReplacmentPrefabHealthScaled()

void SCR_MultiPartDeployableItemComponent.SetReplacmentPrefabHealthScaled ( float newHealthValue)

0-1 scaled amount of health that replacement prefab will have upon deployment

◆ StopMonitoringSurface()

void SCR_MultiPartDeployableItemComponent.StopMonitoringSurface ( IEntity ent,
SCR_HitZone observedHitZone = null,
SCR_BaseDeployableInventoryItemComponent deployableComp = null )
protected

Callback method used to update this entity when surface on which it was deployed changed its damage state.

Parameters
[in]entthat was being monitored
[in]observedHitZonewhich damage state was monitored
[in]deployableCompwhich deployment state was monitored

◆ SurfaceMonitoringInit()

void SCR_MultiPartDeployableItemComponent.SurfaceMonitoringInit ( notnull IEntity surface)

Method used to initialize monitoring of the surface on which this object was deployed.

Parameters
[in]surfacethat will be monitored

◆ TransferDamageValues()

void SCR_MultiPartDeployableItemComponent.TransferDamageValues ( )
protected

Method meant to be used to transfer information about health between this entity and deployed entity.

◆ TryRemoveAllItemsFromStorage()

static void SCR_MultiPartDeployableItemComponent.TryRemoveAllItemsFromStorage ( notnull IEntity owner,
notnull IEntity user )
static

Method that attempts to remove all items stored by provided entity.

◆ TryRemoveMagazineFromWeapons()

static void SCR_MultiPartDeployableItemComponent.TryRemoveMagazineFromWeapons ( notnull IEntity owner,
notnull IEntity user )
static

Method that attempts to remove any magazine from a weapon.

◆ VisualizeReplacementEntity()

void SCR_MultiPartDeployableItemComponent.VisualizeReplacementEntity ( inout vector transform[4],
vector direction = vector::Zero )

Creates or updates preview entity used by this deployable entity as a visualisation of final product.

Parameters
[in,out]transform- marked as inout as operations done on static arrays are done through the pointers thus will impact what is passed into the method
[in]direction

Member Data Documentation

◆ CAN_BUILD_MATERIAL

const ResourceName SCR_MultiPartDeployableItemComponent.CAN_BUILD_MATERIAL = "{56EBF5038622AC95}Assets/Conflict/CanBuild.emat"
staticprotected

◆ CANNOT_BUILD_MATERIAL

const ResourceName SCR_MultiPartDeployableItemComponent.CANNOT_BUILD_MATERIAL = "{14A9DCEA57D1C381}Assets/Conflict/CannotBuild.emat"
staticprotected

◆ m_aFoundElements

ref array<ref SCR_RequiredDeployablePart> SCR_MultiPartDeployableItemComponent.m_aFoundElements
protected

◆ m_bFrontTowardPlayer

bool SCR_MultiPartDeployableItemComponent.m_bFrontTowardPlayer
protected

◆ m_fReplacementPrefabHealthScaled

float SCR_MultiPartDeployableItemComponent.m_fReplacementPrefabHealthScaled = 1
protected

◆ m_iCurrentVariant

int SCR_MultiPartDeployableItemComponent.m_iCurrentVariant = -1
protected

◆ m_VariantContainer

ref SCR_DeployableVariantContainer SCR_MultiPartDeployableItemComponent.m_VariantContainer
protected

◆ MINOR_SAFETY_OFFSET

const float SCR_MultiPartDeployableItemComponent.MINOR_SAFETY_OFFSET = 0.05
staticprotected

◆ s_bShowBoundingBoxDebug

bool SCR_MultiPartDeployableItemComponent.s_bShowBoundingBoxDebug
staticprotected

◆ SEARCH_FAIL_REASON_MISSING_PART

const LocalizedString SCR_MultiPartDeployableItemComponent.SEARCH_FAIL_REASON_MISSING_PART = "#AR-UserAction_Assemble_MissingPart"
staticprotected

◆ TRANSPARENT_MATERIAL

const ResourceName SCR_MultiPartDeployableItemComponent.TRANSPARENT_MATERIAL = "{8FBC3A6E946F056E}Common/Materials/Default_Transparent.emat"
staticprotected

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