Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_MineDamageManager.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/Mines", description: "Damage manager for land mines.")]
3 {
4 }
5 
6 class SCR_MineDamageManager : SCR_DamageManagerComponent
7 {
8  //------------------------------------------------------------------------------------------------
9  override event protected void OnDamageStateChanged(EDamageState state)
10  {
11  if (state != EDamageState.DESTROYED)
12  return;
13 
14  IEntity owner = GetOwner();
15 
16  bool isProxy = false;
17  RplComponent rplComponent = RplComponent.Cast(owner.FindComponent(RplComponent));
18  if (rplComponent && rplComponent.IsProxy())
19  isProxy = true;
20 
21  if (!isProxy)
22  GetGame().GetCallqueue().CallLater(ExplodeWrapper, 1);
23  else
25  }
26 
27  //------------------------------------------------------------------------------------------------
30  {
31  IEntity owner = GetOwner();
32  BaseTriggerComponent triggerComponent = BaseTriggerComponent.Cast(owner.FindComponent(BaseTriggerComponent));
33  if (!triggerComponent)
34  return;
35 
36  triggerComponent.SetLive();
37  triggerComponent.OnUserTriggerOverrideInstigator(owner, GetInstigator());
38  }
39 }
BaseTriggerComponent
Definition: BaseTriggerComponent.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
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
OnDamageStateChanged
SCR_MineDamageManagerClass SCR_DamageManagerComponentClass OnDamageStateChanged(EDamageState state)
Definition: SCR_MineDamageManager.c:9
SCR_MineDamageManagerClass
Definition: SCR_MineDamageManager.c:2
EDamageState
EDamageState
Definition: EDamageState.c:12
ExplodeWrapper
void ExplodeWrapper()
Definition: SCR_MineDamageManager.c:29
GetInstigator
BaseProjectileComponentClass GameComponentClass GetInstigator()
SCR_DamageManagerComponentClass
enum ECharacterHitZoneGroup SCR_DamageManagerComponentClass
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180