Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionDestruction.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Specific building to be destroyed.")]
5 ref SCR_ScenarioFrameworkGet m_EntityGetter;
6
7 [Attribute(defvalue: "0", desc: "Radius Destruction")]
8 bool m_bRadiusDestruction;
9
10 [Attribute(defvalue: "0", desc: "Destruction Radius", params: "0 inf 0.01")]
11 float m_fDestructionRadius;
12
13 protected ref array<SCR_DestructibleBuildingComponent> m_aBuildingComponents;
14
15 //------------------------------------------------------------------------------------------------
16 override void OnActivate(IEntity object)
17 {
18 if (!CanActivate())
19 return;
20
21 if (m_bRadiusDestruction)
22 {
23 GetGame().GetWorld().QueryEntitiesBySphere(object.GetOrigin(), m_fDestructionRadius, QueryEntity, QueryEntitiesFilter);
24 }
25 else
26 {
27 IEntity entity;
28 if (ValidateInputEntity(object, m_EntityGetter, entity))
29 QueryEntity(entity);
30 }
31
33 return;
34
36 {
37 if (building)
38 building.GoToDestroyedStateLoad();
39 }
40 }
41
42 //------------------------------------------------------------------------------------------------
43 protected bool QueryEntity(notnull IEntity ent)
44 {
46 if (!destruction)
47 return true;
48
51
52 m_aBuildingComponents.Insert(destruction);
53 return true;
54 }
55
56 //------------------------------------------------------------------------------------------------
57 protected bool QueryEntitiesFilter(IEntity e)
58 {
60 return true;
61
62 return false;
63 }
64}
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
vector GetOrigin()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
ref array< SCR_DestructibleBuildingComponent > m_aBuildingComponents
SCR_FieldOfViewSettings Attribute