Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_DeployableInventoryItemReplacementComponent.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/DeployableItems", description: "")]
3 {
4 }
5 
6 void OnCompositionDestroyedDelegate(IEntity instigator);
8 typedef ScriptInvokerBase<OnCompositionDestroyedDelegate> OnCompositionDestroyed_Invoker;
9 
12 {
13  [Attribute()]
14  protected ref PointInfo m_vItemPosition;
15 
16  protected ref OnCompositionDestroyed_Invoker m_OnCompositionDestroyed;
17 
18  //------------------------------------------------------------------------------------------------
20  void GetItemTransform(out vector mat[4])
21  {
22  if (m_vItemPosition)
23  m_vItemPosition.GetTransform(mat);
24  }
25 
26  //------------------------------------------------------------------------------------------------
28  OnCompositionDestroyed_Invoker GetOnCompositionDestroyed()
29  {
30  if (!m_OnCompositionDestroyed)
31  m_OnCompositionDestroyed = new OnCompositionDestroyed_Invoker();
32 
33  return m_OnCompositionDestroyed;
34  }
35 
36  //------------------------------------------------------------------------------------------------
37  protected void OnDamageStateChanged()
38  {
39  SCR_DamageManagerComponent damageManager = SCR_DamageManagerComponent.GetDamageManager(GetOwner());
40  IEntity instigator;
41  if (damageManager)
42  instigator = damageManager.GetInstigator().GetInstigatorEntity();
43 
44  if (m_OnCompositionDestroyed && damageManager.IsDestroyed())
45  m_OnCompositionDestroyed.Invoke(instigator);
46  }
47 
48  //------------------------------------------------------------------------------------------------
49  override void EOnInit(IEntity owner)
50  {
51  SCR_DamageManagerComponent damageManager = SCR_DamageManagerComponent.GetDamageManager(owner);
52  damageManager.GetOnDamageStateChanged().Insert(OnDamageStateChanged);
53  }
54 
55  //------------------------------------------------------------------------------------------------
56  override void OnPostInit(IEntity owner)
57  {
58  SetEventMask(owner, EntityEvent.INIT);
59  }
60 }
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
SCR_DeployableInventoryItemReplacementComponentClass
Definition: SCR_DeployableInventoryItemReplacementComponent.c:2
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
func
func
Definition: SCR_AIThreatSystem.c:5
OnCompositionDestroyedDelegate
func OnCompositionDestroyedDelegate
Definition: SCR_DeployableInventoryItemReplacementComponent.c:7
OnCompositionDestroyed_Invoker
ScriptInvokerBase< OnCompositionDestroyedDelegate > OnCompositionDestroyed_Invoker
Definition: SCR_DeployableInventoryItemReplacementComponent.c:8
Attribute
typedef Attribute
Post-process effect of scripted camera.
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
SCR_DeployableInventoryItemReplacementComponent
Holds Position of where the deployable item will be attached to.
Definition: SCR_DeployableInventoryItemReplacementComponent.c:11
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180