Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkSlotTrigger.c
Go to the documentation of this file.
1[EntityEditorProps(category: "GameScripted/ScenarioFramework/Slot", description: "")]
5
6class SCR_ScenarioFrameworkSlotTrigger : SCR_ScenarioFrameworkSlotBase
7{
8 [Attribute(desc: "Actions that will be performed after trigger conditions are true and the trigger itself activates (not the slot itself)", category: "OnActivation")]
9 ref array<ref SCR_ScenarioFrameworkActionBase> m_aTriggerActions;
10
11 protected bool m_bPreviousTriggerState;
12
13 //------------------------------------------------------------------------------------------------
18 override void RestoreToDefault(bool includeChildren = false, bool reinitAfterRestoration = false, bool affectRandomization = true, bool deleteSpawnedEntities = true)
19 {
20 foreach (SCR_ScenarioFrameworkActionBase activationAction : m_aTriggerActions)
21 {
22 activationAction.RestoreToDefault();
23 }
24
25 super.RestoreToDefault(includeChildren, reinitAfterRestoration, affectRandomization, deleteSpawnedEntities);
26 }
27
28 //------------------------------------------------------------------------------------------------
30 override void FinishInit()
31 {
32 BaseGameTriggerEntity trigger = BaseGameTriggerEntity.Cast(m_Entity);
33 if (trigger)
34 {
35 m_bPreviousTriggerState = trigger.IsPeriodicQueriesEnabled();
36 trigger.EnablePeriodicQueries(false);
37
39 if (frameworkTrigger)
40 frameworkTrigger.SetInitSequenceDone(false);
41 }
42
43 super.FinishInit();
44 }
45
46 //------------------------------------------------------------------------------------------------
50 {
51 m_bInitiated = true;
52
53 if (m_ParentLayer)
54 m_ParentLayer.CheckAllChildrenSpawned(this);
55
56 if (!m_Area)
58
59 if (m_Area)
60 {
61 m_Area.GetOnAllChildrenSpawned().Insert(AfterParentAreaChildrenSpawned);
62 m_Area.CheckAllChildrenSpawned(this);
63 }
64
66 }
67
68 //------------------------------------------------------------------------------------------------
72 {
74 {
75 plugin.Init(this);
76 }
77
79
81 {
82 triggerAction.Init(m_Entity);
83 }
84
85 if (m_fRepeatedSpawnTimer >= 0)
87
88 if (m_Area)
89 m_Area.GetOnAllChildrenSpawned().Remove(AfterParentAreaChildrenSpawned);
90
91 if (m_Entity)
92 {
93 BaseGameTriggerEntity trigger = BaseGameTriggerEntity.Cast(m_Entity);
94 if (trigger)
95 {
96 trigger.EnablePeriodicQueries(m_bPreviousTriggerState);
97
99 if (frameworkTrigger)
100 frameworkTrigger.SetInitSequenceDone(true);
101 }
102 }
103 }
104}
LayerPresets layer
enum EAITargetInfoCategory m_Entity
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
float m_fRepeatedSpawnTimer
void RepeatedSpawn()
Repetitive spawning with timer.
SCR_ScenarioFrameworkLayerBase m_ParentLayer
ScriptInvokerScenarioFrameworkLayer GetOnAllChildrenSpawned()
void FinishInit()
Initializes children, retrieves them, and spawns them.
SCR_ScenarioFrameworkArea GetParentArea()
void InitActivationActions()
void AfterAllChildrenSpawned(SCR_ScenarioFrameworkLayerBase layer)
void SCR_ScenarioFrameworkLayerBase(IEntityComponentSource src, IEntity ent, IEntity parent)
ref array< ref SCR_ScenarioFrameworkPlugin > m_aPlugins
SCR_ScenarioFrameworkArea m_Area
void RestoreToDefault()
void SCR_ScenarioFrameworkSlotBase(IEntityComponentSource src, IEntity ent, IEntity parent)
void AfterParentAreaChildrenSpawned(SCR_ScenarioFrameworkLayerBase layer)
ref array< ref SCR_ScenarioFrameworkActionSave > m_aTriggerActions
void SetInitSequenceDone(bool init)
Sets Init sequence as done or not.
SCR_FieldOfViewSettings Attribute