Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_BaseTriggerEntity.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/Triggers", description: "")]
3 {
4 }
5 
7 class SCR_BaseTriggerEntity : ScriptedGameTriggerEntity
8 {
9  protected ref ScriptInvoker m_OnActivate = new ScriptInvoker(); // TODO: ScriptInvokerEntity
10  protected ref ScriptInvoker m_OnDeactivate = new ScriptInvoker(); // TODO: ScriptInvokerVoid
11 
12  protected bool IsAlive(IEntity entity)
13  {
14  SCR_DamageManagerComponent damageManager = SCR_DamageManagerComponent.GetDamageManager(entity);
15  if (damageManager)
16  return damageManager.GetState() != EDamageState.DESTROYED;
17  else
18  return true;
19  }
20 
21  //------------------------------------------------------------------------------------------------
23  ScriptInvoker GetOnActivate()
24  {
25  return m_OnActivate;
26  }
27  //------------------------------------------------------------------------------------------------
29  ScriptInvoker GetOnDeactivate()
30  {
31  return m_OnDeactivate;
32  }
33 
34  //------------------------------------------------------------------------------------------------
35  override protected event void OnActivate(IEntity ent)
36  {
37  m_OnActivate.Invoke(ent);
38  }
39 
40  //------------------------------------------------------------------------------------------------
41  override protected event void OnDeactivate(IEntity ent)
42  {
43  m_OnDeactivate.Invoke();
44  }
45 }
IsAlive
protected bool IsAlive(IEntity entity)
Definition: SCR_BaseTriggerEntity.c:12
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
m_OnActivate
SCR_BaseTriggerEntityClass m_OnActivate
Basic scripted trigger which offers external invoekrs for major events like activation or deactivatio...
EDamageState
EDamageState
Definition: EDamageState.c:12
OnDeactivate
override protected event void OnDeactivate(IEntity ent)
callback - deactivation - occurs when and entity which was activated (OnActivate) leaves the Trigger
Definition: SCR_BaseTriggerEntity.c:41
ScriptedGameTriggerEntityClass
Definition: ScriptedGameTriggerEntity.c:12
m_OnDeactivate
protected ref ScriptInvoker m_OnDeactivate
Definition: SCR_BaseTriggerEntity.c:10
GetOnDeactivate
ScriptInvoker GetOnDeactivate()
Definition: SCR_BaseTriggerEntity.c:29
SCR_BaseTriggerEntityClass
Definition: SCR_BaseTriggerEntity.c:2
GetOnActivate
ScriptInvoker GetOnActivate()
Definition: SCR_BaseTriggerEntity.c:23
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180
OnActivate
override protected event void OnActivate(IEntity ent)
callback - activation - occurs when and entity which fulfills the filter definitions enters the Trigg...
Definition: SCR_BaseTriggerEntity.c:35