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

Public Member Functions

override void Update (float timeSlice)
 
override void OnToggleActive (bool state)
 Event called from SCR_GadgetManagerComponent through RPC request.
 
override EGadgetType GetType ()
 Get gadget type.
 
override void ModeSwitch (EGadgetMode mode, IEntity charOwner)
 Triggered when an operation with gadget is performed - picked up, taken into hands, back to backpack etc.
 
void ToolToHand ()
 Building tool taken to hand - show preview etc.
 
void OnPossessed (int playerID, bool isPossessing, RplId mainEntityID)
 
void ToolToInventory ()
 Building tool out of hands - show preview.
 
SCR_EditorModeEntity GetBuildingModeEntity ()
 Search for an editor mode entity (exists only when the player is in editor mode)
 
void OnConsciousnessChanged (bool conscious)
 
void RemoveOnConsciousnessChanged ()
 
int GetToolConstructionValue ()
 
SCR_CharacterControllerComponent GetCharacterControllerComponent ()
 
void RemoveEventHandlers ()
 
bool GetCanEnterPlacementMode ()
 
bool HasMoreItemsToPlace ()
 
bool HasMoreVariants ()
 
bool GetIsPlacementModeEnabled ()
 
SCR_MultiPartDeployableItemComponent GetCurrentlyHandledComponent ()
 
float GetMaxAllowedTilt ()
 
bool ValidateSpace (notnull SCR_ItemPlacementComponent caller, inout vector transform[4], out ENotification cantPlaceReason)
 Method used to check if there is enough space for currently handled deployable variant.
 
void OnItemPlacementStart (notnull SCR_ItemPlacementComponent caller)
 
void OnAfterItemPlaced (notnull SCR_ItemPlacementComponent caller, notnull IEntity item, bool success, bool equipNext)
 
bool SelectNextVariant ()
 
- Public Member Functions inherited from SCR_GadgetComponent
EGadgetAnimVariable GetAnimVariable ()
 
float GetWeaponNoFireTime ()
 
bool IsToggledOn ()
 Is gadget toggled on/off.
 
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 ToggleFocused (bool enable)
 Toggle gadget focus state.
 
ChimeraCharacter GetCharacterOwner ()
 Get IEntity in possession of this Gadget.
 
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.
 
override bool RplSave (ScriptBitWriter writer)
 
override bool RplLoad (ScriptBitReader reader)
 
override void OnDelete (IEntity owner)
 
override void OnPostInit (IEntity owner)
 

Protected Member Functions

void RemovePreviews ()
 
void OnEditorOpened ()
 Method called when character has a shovel in hands and any editor mode is opned.
 
void OnEditorClosed ()
 Method called when character has a shovel in hands and any editor mode is closed.
 
bool TraceCompositionToShowPreview ()
 Trace the possible previews.
 
bool EvaluatePreviewEntity (IEntity ent)
 
int FindDeployableItems (IEntity ignoredItem=null, bool skipUniqueCountCheck=false)
 Searches the inventory for compatible deployable items.
 
override void ActivateAction ()
 Action listener callback.
 
override void ModeClear (EGadgetMode mode)
 Clear gadget mode.
 
void SetPlacementMode (bool newState)
 
void CycleItems (float value=0.0, EActionTrigger reason=0, string actionName=string.Empty)
 Callback method used to cycle between all unique deployable items.
 
void CycleVariants (float value=0.0, EActionTrigger reason=0, string actionName=string.Empty)
 Callback method used to cycle between all available variants for currently used deployable.
 
void SelectNextPlaceableItem (notnull SCR_ItemPlacementComponent placementComp)
 
void EnablePreview (bool enabled, notnull SCR_ItemPlacementComponent placementComp)
 
- Protected Member Functions inherited from SCR_GadgetComponent
void ConnectToGadgetsSystem ()
 Starts on frame update event.
 
void DisconnectFromGadgetsSystem ()
 
- Protected Member Functions inherited from ScriptGameComponent
bool OnTicksOnRemoteProxy ()
 

Protected Attributes

float m_fDistanceToShowPreview
 
float m_fDistanceToBuildComposition
 
int m_iConstructionValue
 
float m_fTraceDelay
 
ref array< SCR_CampaignBuildingLayoutComponentm_aShownPreview = {}
 
ref array< SCR_CampaignBuildingLayoutComponentm_aShownPreviewOld = {}
 
bool m_bToolActiveWhenEditorOpen
 
ref array< IEntity > m_aFoundDeployables
 
SCR_MultiPartDeployableItemComponent m_CurrentlyHandledComponent
 
int m_iCurrentVariant = -1
 
bool m_bPlacementModeEnabled
 
bool m_bCanEnterPlacementMode
 
bool m_bHasMoreItemsToPlace
 
bool m_bHasMoreVariantsToChoose
 
- Protected Attributes inherited from SCR_GadgetComponent
EGadgetAnimVariable m_eAnimVariable
 
SCR_EUseContext m_eUseMask
 
vector m_vEquipmentSlotOffset
 
float m_fWeaponNoFireTime
 
bool m_bCanBeHeld
 
bool m_bActivated = false
 
EGadgetMode m_iMode = EGadgetMode.ON_GROUND
 
ChimeraCharacter m_CharacterOwner
 

Static Protected Attributes

const static float TRACE_DELAY_VALUE = 0.5
 

Additional Inherited Members

- Public Attributes inherited from SCR_GadgetComponent
bool m_bFocused
 

Member Function Documentation

◆ ActivateAction()

override void SCR_CampaignBuildingGadgetToolComponent.ActivateAction ( )
protected

Action listener callback.

Implements SCR_GadgetComponent.

◆ CycleItems()

void SCR_CampaignBuildingGadgetToolComponent.CycleItems ( float value = 0::0,
EActionTrigger reason = 0,
string actionName = string::Empty )
protected

Callback method used to cycle between all unique deployable items.

Parameters
[in]value
[in]reason
[in]actionName

◆ CycleVariants()

void SCR_CampaignBuildingGadgetToolComponent.CycleVariants ( float value = 0::0,
EActionTrigger reason = 0,
string actionName = string::Empty )
protected

Callback method used to cycle between all available variants for currently used deployable.

Parameters
[in]value
[in]reason
[in]actionName

◆ EnablePreview()

void SCR_CampaignBuildingGadgetToolComponent.EnablePreview ( bool enabled,
notnull SCR_ItemPlacementComponent placementComp )
protected
Parameters
[in]enabled
[in]placementComp

◆ EvaluatePreviewEntity()

bool SCR_CampaignBuildingGadgetToolComponent.EvaluatePreviewEntity ( IEntity ent)
protected

◆ FindDeployableItems()

int SCR_CampaignBuildingGadgetToolComponent.FindDeployableItems ( IEntity ignoredItem = null,
bool skipUniqueCountCheck = false )
protected

Searches the inventory for compatible deployable items.

Parameters
[in]ignoredItem
[in]skipUniqueCountChecktrue if game should not try validate if player can cycle between available deployable items
Returns
number of found items

◆ GetBuildingModeEntity()

SCR_EditorModeEntity SCR_CampaignBuildingGadgetToolComponent.GetBuildingModeEntity ( )

Search for an editor mode entity (exists only when the player is in editor mode)

Returns

◆ GetCanEnterPlacementMode()

bool SCR_CampaignBuildingGadgetToolComponent.GetCanEnterPlacementMode ( )

◆ GetCharacterControllerComponent()

SCR_CharacterControllerComponent SCR_CampaignBuildingGadgetToolComponent.GetCharacterControllerComponent ( )
Returns

◆ GetCurrentlyHandledComponent()

SCR_MultiPartDeployableItemComponent SCR_CampaignBuildingGadgetToolComponent.GetCurrentlyHandledComponent ( )

◆ GetIsPlacementModeEnabled()

bool SCR_CampaignBuildingGadgetToolComponent.GetIsPlacementModeEnabled ( )

◆ GetMaxAllowedTilt()

float SCR_CampaignBuildingGadgetToolComponent.GetMaxAllowedTilt ( )
Returns
currently placed deployable max allowed tilt, and if such data is not available then it will return -1

◆ GetToolConstructionValue()

int SCR_CampaignBuildingGadgetToolComponent.GetToolConstructionValue ( )
Returns
the value how much this tool adds to a building value with one action

◆ GetType()

override EGadgetType SCR_CampaignBuildingGadgetToolComponent.GetType ( )

Get gadget type.

Returns
Returns gadget type

Implements SCR_GadgetComponent.

◆ HasMoreItemsToPlace()

bool SCR_CampaignBuildingGadgetToolComponent.HasMoreItemsToPlace ( )

◆ HasMoreVariants()

bool SCR_CampaignBuildingGadgetToolComponent.HasMoreVariants ( )

◆ ModeClear()

override void SCR_CampaignBuildingGadgetToolComponent.ModeClear ( EGadgetMode mode)
protected

Clear gadget mode.

Parameters
[in]modeis the mode being cleared

Implements SCR_GadgetComponent.

◆ ModeSwitch()

override void SCR_CampaignBuildingGadgetToolComponent.ModeSwitch ( EGadgetMode mode,
IEntity charOwner )

Triggered when an operation with gadget is performed - picked up, taken into hands, back to backpack etc.

Parameters
[in]mode
[in]charOwnermust have a GadgetManager component

Implements SCR_GadgetComponent.

◆ OnAfterItemPlaced()

void SCR_CampaignBuildingGadgetToolComponent.OnAfterItemPlaced ( notnull SCR_ItemPlacementComponent caller,
notnull IEntity item,
bool success,
bool equipNext )
Parameters
[in]caller
[in]item
[in]succes
[in]equipNext

◆ OnConsciousnessChanged()

void SCR_CampaignBuildingGadgetToolComponent.OnConsciousnessChanged ( bool conscious)

◆ OnEditorClosed()

void SCR_CampaignBuildingGadgetToolComponent.OnEditorClosed ( )
protected

Method called when character has a shovel in hands and any editor mode is closed.

◆ OnEditorOpened()

void SCR_CampaignBuildingGadgetToolComponent.OnEditorOpened ( )
protected

Method called when character has a shovel in hands and any editor mode is opned.

◆ OnItemPlacementStart()

void SCR_CampaignBuildingGadgetToolComponent.OnItemPlacementStart ( notnull SCR_ItemPlacementComponent caller)
Parameters
[in]caller

◆ OnPossessed()

void SCR_CampaignBuildingGadgetToolComponent.OnPossessed ( int playerID,
bool isPossessing,
RplId mainEntityID )
Parameters
[in]playerID
[in]isPossessing
[in]mainEntityID

◆ OnToggleActive()

override void SCR_CampaignBuildingGadgetToolComponent.OnToggleActive ( bool state)

Event called from SCR_GadgetManagerComponent through RPC request.

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

Implements SCR_GadgetComponent.

◆ RemoveEventHandlers()

void SCR_CampaignBuildingGadgetToolComponent.RemoveEventHandlers ( )

◆ RemoveOnConsciousnessChanged()

void SCR_CampaignBuildingGadgetToolComponent.RemoveOnConsciousnessChanged ( )

◆ RemovePreviews()

void SCR_CampaignBuildingGadgetToolComponent.RemovePreviews ( )
protected

◆ SelectNextPlaceableItem()

void SCR_CampaignBuildingGadgetToolComponent.SelectNextPlaceableItem ( notnull SCR_ItemPlacementComponent placementComp)
protected
Parameters
[in]placementComp

◆ SelectNextVariant()

bool SCR_CampaignBuildingGadgetToolComponent.SelectNextVariant ( )
Returns

◆ SetPlacementMode()

void SCR_CampaignBuildingGadgetToolComponent.SetPlacementMode ( bool newState)
protected
Parameters
[in]newState

◆ ToolToHand()

void SCR_CampaignBuildingGadgetToolComponent.ToolToHand ( )

Building tool taken to hand - show preview etc.

◆ ToolToInventory()

void SCR_CampaignBuildingGadgetToolComponent.ToolToInventory ( )

Building tool out of hands - show preview.

◆ TraceCompositionToShowPreview()

bool SCR_CampaignBuildingGadgetToolComponent.TraceCompositionToShowPreview ( )
protected

Trace the possible previews.

Returns

◆ Update()

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

Implements SCR_GadgetComponent.

◆ ValidateSpace()

bool SCR_CampaignBuildingGadgetToolComponent.ValidateSpace ( notnull SCR_ItemPlacementComponent caller,
inout vector transform[4],
out ENotification cantPlaceReason )

Method used to check if there is enough space for currently handled deployable variant.

Parameters
[in]caller
[in,out]transformof the position for which validation should be performed. This position has already applied offset of 1% of its up vector (1cm)
[out]cantPlaceReason
Returns

Member Data Documentation

◆ m_aFoundDeployables

ref array<IEntity> SCR_CampaignBuildingGadgetToolComponent.m_aFoundDeployables
protected

◆ m_aShownPreview

ref array<SCR_CampaignBuildingLayoutComponent> SCR_CampaignBuildingGadgetToolComponent.m_aShownPreview = {}
protected

◆ m_aShownPreviewOld

ref array<SCR_CampaignBuildingLayoutComponent> SCR_CampaignBuildingGadgetToolComponent.m_aShownPreviewOld = {}
protected

◆ m_bCanEnterPlacementMode

bool SCR_CampaignBuildingGadgetToolComponent.m_bCanEnterPlacementMode
protected

◆ m_bHasMoreItemsToPlace

bool SCR_CampaignBuildingGadgetToolComponent.m_bHasMoreItemsToPlace
protected

◆ m_bHasMoreVariantsToChoose

bool SCR_CampaignBuildingGadgetToolComponent.m_bHasMoreVariantsToChoose
protected

◆ m_bPlacementModeEnabled

bool SCR_CampaignBuildingGadgetToolComponent.m_bPlacementModeEnabled
protected

◆ m_bToolActiveWhenEditorOpen

bool SCR_CampaignBuildingGadgetToolComponent.m_bToolActiveWhenEditorOpen
protected

◆ m_CurrentlyHandledComponent

SCR_MultiPartDeployableItemComponent SCR_CampaignBuildingGadgetToolComponent.m_CurrentlyHandledComponent
protected

◆ m_fDistanceToBuildComposition

float SCR_CampaignBuildingGadgetToolComponent.m_fDistanceToBuildComposition
protected

◆ m_fDistanceToShowPreview

float SCR_CampaignBuildingGadgetToolComponent.m_fDistanceToShowPreview
protected

◆ m_fTraceDelay

float SCR_CampaignBuildingGadgetToolComponent.m_fTraceDelay
protected

◆ m_iConstructionValue

int SCR_CampaignBuildingGadgetToolComponent.m_iConstructionValue
protected

◆ m_iCurrentVariant

int SCR_CampaignBuildingGadgetToolComponent.m_iCurrentVariant = -1
protected

◆ TRACE_DELAY_VALUE

const static float SCR_CampaignBuildingGadgetToolComponent.TRACE_DELAY_VALUE = 0.5
staticprotected

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