|
Arma Reforger Script API
|
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_RequiredDeployablePart > | m_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 |
| override void SCR_MultiPartDeployableItemComponent._WB_AfterWorldUpdate | ( | IEntity | owner, |
| float | timeSlice ) |
| override array< ref WB_UIMenuItem > SCR_MultiPartDeployableItemComponent._WB_GetContextMenuItems | ( | IEntity | owner | ) |
| override void SCR_MultiPartDeployableItemComponent._WB_OnContextMenu | ( | IEntity | owner, |
| int | id ) |
| 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.
| [in,out] | transform | matrix 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] | direction | in which spawned entity should be aligned to |
| [out] | reason | of what is obstructing the space |
| 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.
| 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.
| [in] | up | vector of the surface |
| [in] | useDataFromOwnerPosition | when ture, then value up is overriden by a result of a trace at the position of the owner of this component |
| void SCR_MultiPartDeployableItemComponent.ClearCache | ( | ) |
Clears the information about currently handled variant.
|
protected |
Transform to have the right direction.
| [in,out] | transform | matrix 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] | direction | in which spawned entity should be aligned to |
| 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.
|
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
| 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.
| [in] | userEntity | player who deployed it |
| [in] | direction | in which it should be deployed |
| [in] | reload | |
| [in] | state | should the resulting state be considered as deployed |
| void SCR_MultiPartDeployableItemComponent.DrawBoundingBoxDebug | ( | notnull IEntity | owner | ) |
| [in] | owner |
|
protected |
Callback method used to filter found elements and store all required parts.
| [in] | ent | entity that was found with the query |
|
protected |
Method used to execute reactionary behaviour on the changes made to the surface on which this object was deployed.
| [in] | beaviour | override of the behaviour that was defined for this prefab |
| bool SCR_MultiPartDeployableItemComponent.FetchVariantData | ( | int | variant | ) |
Method used to find and cache the data about the variant.
| [int] | variant id that is meant to be found |
| 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.
| [in] | e | |
| [in] | start | |
| [in] | dir |
| 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.
| [out] | failReason | string containing the text about missing item with their name |
| [in] | position | from which script will search for required elements. If position == -vector.One then owner origin will be used |
| vector SCR_MultiPartDeployableItemComponent.GetAdditionaPlacementOffset | ( | ) |
| vector SCR_MultiPartDeployableItemComponent.GetAdditionaPlacementRotation | ( | ) |
| int SCR_MultiPartDeployableItemComponent.GetCurrentlyCachedVariantId | ( | ) |
| bool SCR_MultiPartDeployableItemComponent.GetFrontTowardPlayer | ( | ) |
| float SCR_MultiPartDeployableItemComponent.GetReplacementPrefabHealthScaled | ( | ) |
| bool SCR_MultiPartDeployableItemComponent.IsUsingPartPositionAndRotation | ( | ) |
|
protected |
Implements SCR_BaseDeployableInventoryItemComponent.
| 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.
| [in] | damagedHitZone |
| void SCR_MultiPartDeployableItemComponent.OnMonitoredSurfaceDeleted | ( | IEntity | deletedEntity | ) |
Callback method used to update this entity when surface on which it was deployed got deleted.
| [in] | deletedEntity |
| 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.
| [in] | newState | |
| [in] | component |
|
protected |
Implements SCR_BaseDeployableInventoryItemComponent.
|
protected |
|
protected |
|
static |
Method used to inform spawned entities about who is their author.
| [in] | ent | entity for which author will be set |
| [in] | playerID |
| void SCR_MultiPartDeployableItemComponent.SetPreviewState | ( | SCR_EPreviewState | state | ) |
| [in] | state |
| void SCR_MultiPartDeployableItemComponent.SetReplacmentPrefabHealthScaled | ( | float | newHealthValue | ) |
0-1 scaled amount of health that replacement prefab will have upon deployment
|
protected |
Callback method used to update this entity when surface on which it was deployed changed its damage state.
| [in] | ent | that was being monitored |
| [in] | observedHitZone | which damage state was monitored |
| [in] | deployableComp | which deployment state was monitored |
| void SCR_MultiPartDeployableItemComponent.SurfaceMonitoringInit | ( | notnull IEntity | surface | ) |
Method used to initialize monitoring of the surface on which this object was deployed.
| [in] | surface | that will be monitored |
|
protected |
Method meant to be used to transfer information about health between this entity and deployed entity.
|
static |
Method that attempts to remove all items stored by provided entity.
|
static |
Method that attempts to remove any magazine from a weapon.
| 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.
| [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 |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |