Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_HeadgearInventoryItemComponent Interface Reference
Inheritance diagram for SCR_HeadgearInventoryItemComponent:
InventoryItemComponent GameComponent

Public Member Functions

void DetachHelmet (float damageValue, EDamageType damageType, vector impactDirection, vector impactPosition, notnull ChimeraCharacter character)
 Evaluates if provided damage should be capable of detaching the helmet from the character, and in such case schedules force application based on the damage amount This method should only be called by the authority.
 
void ApplyForce (vector positionFrom, vector offset, vector force)
 Applies the force to the entity and enables synchronization of the physics simulation.
 
void OnPhysicsStateChanged (bool isActive)
 
- Public Member Functions inherited from InventoryItemComponent
proto external IEntity GetOwner ()
 Returns Entity owner of current component instance.
 
proto external bool IsLocked ()
 Returns locked state of item (for both user and system locks)
 
proto external bool IsUserLocked ()
 
proto external bool IsSystemLocked ()
 
proto external InventoryStorageSlot GetParentSlot ()
 
proto external ItemAttributeCollection GetAttributes ()
 
proto external void HideOwner ()
 Hide owner entity.
 
proto external void ShowOwner ()
 Show owner entity.
 
proto external void SetTraceable (bool traceable)
 Set the entity to be traceable or not.
 
proto external void DisablePhysics ()
 Disable owners physical interactions.
 
proto external void EnablePhysics ()
 Enable owners physical interactions.
 
proto external void ActivateOwner (bool active)
 Enable/Disable entity active state.
 
proto external float GetAdditionalWeight ()
 Returns the current additional weight.
 
proto external void SetAdditionalWeight (float additionalWeight)
 IMPORTANT* Could only be called on the master.
 
proto external float GetTotalWeight ()
 Returns the weight + the additional weight.
 
proto external float GetAdditionalVolume ()
 Returns the current additional volume.
 
proto external void SetAdditionalVolume (float additionalVolume)
 IMPORTANT* Could only be called on the master.
 
proto external float GetTotalVolume ()
 Returns the volume + the additional volume.
 
proto external void PlaceOnGround (IEntity callerEntity=null)
 IMPORTANT* This function is heavy in performance because of the multiple traces used inside the function.
 
proto external bool IsHiddenInVicnity ()
 returns true if item should be hidden
 
proto external UIInfo GetUIInfo ()
 Returns UI info of this item.
 
proto external bool RequestUserLock (IEntity caller, bool locked)
 Set external lock on item optional caller is entity that manipulates with item and has inventory manager present (usually character)
 
proto external BaseItemAttributeData FindAttribute (TypeName typeName)
 Convinience method Finds first occurance of the coresponding attribute data object in owned PrefabData AttributeCollection.
 
proto external IEntity CreatePreviewEntity (BaseWorld world, int camera)
 Creates preview entity in the provided world.
 
- Public Member Functions inherited from GameComponent
bool OnTicksOnRemoteProxy ()
 

Protected Member Functions

override void OnPostInit (IEntity owner)
 
- Protected Member Functions inherited from InventoryItemComponent
bool ShouldChangeVisibilityOfHierarchy ()
 
bool ShouldHideInVicinity ()
 implement custom visibility behavior in vicinity
 
bool OverridePlacementTransform (IEntity caller, out vector computedTransform[4])
 Override final transformation of dropped item, return true in case transformation should be applied.
 
void OnPlacedOnGround ()
 Override this function if for example physics should be enabled or item's owner should be activated when an item is placed on ground.
 
void OnDelete (IEntity owner)
 

Protected Attributes

bool m_bLock
 Lock that is used to ensure that detaching procedure will not start twice.
 

Static Protected Attributes

static const float FORCE_IMPULSE_LIMIT = 10
 Limit force to 10m/s or else headgear may become an interstellar body.
 

Additional Inherited Members

- Public Attributes inherited from InventoryItemComponent
ref ScriptInvoker< bool > m_OnLockedStateChangedInvoker = new ScriptInvoker<bool>()
 
ref ScriptInvoker< InventoryStorageSlot, InventoryStorageSlotm_OnParentSlotChangedInvoker = new ScriptInvoker<InventoryStorageSlot, InventoryStorageSlot>()
 

Member Function Documentation

◆ ApplyForce()

void SCR_HeadgearInventoryItemComponent.ApplyForce ( vector positionFrom,
vector offset,
vector force )

Applies the force to the entity and enables synchronization of the physics simulation.

Should be only executed by the authority.

Parameters
[in]positionFrom
[in]offset
[in]force

◆ DetachHelmet()

void SCR_HeadgearInventoryItemComponent.DetachHelmet ( float damageValue,
EDamageType damageType,
vector impactDirection,
vector impactPosition,
notnull ChimeraCharacter character )

Evaluates if provided damage should be capable of detaching the helmet from the character, and in such case schedules force application based on the damage amount This method should only be called by the authority.

Parameters
[in]damageValue
[in]damageType
[in]impactDirection
[in]impactPosition
[in]characterwho is wearing the headgear

◆ OnPhysicsStateChanged()

void SCR_HeadgearInventoryItemComponent.OnPhysicsStateChanged ( bool isActive)
Parameters
[in]isActive

◆ OnPostInit()

override void SCR_HeadgearInventoryItemComponent.OnPostInit ( IEntity owner)
protected

Member Data Documentation

◆ FORCE_IMPULSE_LIMIT

const float SCR_HeadgearInventoryItemComponent.FORCE_IMPULSE_LIMIT = 10
staticprotected

Limit force to 10m/s or else headgear may become an interstellar body.

◆ m_bLock

bool SCR_HeadgearInventoryItemComponent.m_bLock
protected

Lock that is used to ensure that detaching procedure will not start twice.


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