Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_DestructionManagerComponent.c
Go to the documentation of this file.
1 #define ENABLE_BASE_DESTRUCTION
2 [EntityEditorProps(category: "GameScripted/Destruction", description: "Enables destruction.")]
3 class SCR_DestructionManagerComponentClass : ScriptComponentClass
4 {
5 }
6 
7 class SCR_DestructionManagerComponent : ScriptComponent
8 {
9 #ifdef ENABLE_BASE_DESTRUCTION
10  //------------------------------------------------------------------------------------------------
11  override void OnPostInit(IEntity owner)
12  {
13  SetEventMask(owner, EntityEvent.INIT);
14  }
15 
16  //------------------------------------------------------------------------------------------------
17  override void EOnInit(IEntity owner)
18  {
19  RplComponent rplComponent = RplComponent.Cast(owner.FindComponent(RplComponent));
20  if (!rplComponent || rplComponent.IsProxy())
21  return;
22 
23  float delay = 10000;
24 
25  if (RplSession.Mode() != RplMode.Dedicated)
26  delay = 500;
27 
28  GetGame().GetCallqueue().CallLater(SCR_MPDestructionManager.InitializeDestructionManager, delay, false);
29  }
30 #endif
31 }
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_MPDestructionManager
Definition: SCR_MPDestructionManager.c:103
OnPostInit
SCR_DestructionManagerComponentClass ScriptComponentClass OnPostInit(IEntity owner)
Called on PostInit when all components are added.
Definition: SCR_DestructionManagerComponent.c:11
EOnInit
override void EOnInit(IEntity owner)
Definition: SCR_DestructionManagerComponent.c:17
SCR_DestructionManagerComponentClass
Definition: SCR_DestructionManagerComponent.c:3
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180