7 [
Attribute(
"0",
UIWidgets.ComboBox,
"By whom the trigger is activated",
"", ParamEnumArray.FromEnum(SCR_EScenarioFrameworkTriggerActivation),
category:
"Trigger Activation")]
8 SCR_EScenarioFrameworkTriggerActivation m_eActivationPresence;
10 [
Attribute(
desc:
"Fill the entity names here for detection. Is combined with other filters using OR.",
category:
"Trigger")]
11 ref array<string> m_aSpecificEntityNames;
14 ref array<string> m_aSpecificClassNames;
16 [
Attribute(
desc:
"Which Prefabs and if their children will be detected by the trigger. Is combined with other filters using OR.",
category:
"Trigger")]
17 ref array<ref SCR_ScenarioFrameworkPrefabFilter> m_aPrefabFilter;
22 [
Attribute(
desc:
"Here you can input custom trigger conditions that you can create by extending the SCR_CustomTriggerConditions", uiwidget:
UIWidgets.Object)]
23 ref array<ref SCR_ScenarioFrameworkActivationConditionBase> m_aCustomTriggerConditions;
28 [
Attribute(defvalue:
"1",
UIWidgets.CheckBox,
desc:
"If you set some vehicle to be detected by the trigger, it will also search the inventory for vehicle prefabs/classes that are set",
category:
"Trigger")]
29 bool m_bSearchVehicleInventory;
31 [
Attribute(defvalue:
"1",
UIWidgets.CheckBox,
desc:
"Activate the trigger once or everytime the activation condition is true?",
category:
"Trigger")]
35 bool m_bActivateOnEmpty;
37 [
Attribute(defvalue:
"1",
UIWidgets.Slider,
desc:
"How frequently is the trigger updated and performing calculations. Lower numbers will decrease performance.",
params:
"0 86400 1",
category:
"Trigger")]
41 float m_fMinimumPlayersNeededPercentage;
43 [
Attribute(defvalue:
"0",
UIWidgets.Slider,
desc:
"For how long the trigger conditions must be true in order for the trigger to activate. If conditions become false, timer resets",
params:
"0 86400 1",
category:
"Trigger")]
44 float m_fActivationCountdownTimer;
47 bool m_bNotificationEnabled;
49 [
Attribute(
desc:
"Notification title text that will be displayed when the PLAYER Activation presence is selected",
category:
"Trigger")]
50 string m_sPlayerActivationNotificationTitle;
56 string m_sCountdownAudio;
58 [
Attribute(
desc:
"Actions that will be activated when entity that went through the filter entered the trigger and is inside (Be carefull as Framework Triggers activate this periodically if you don't disable the Once attribute)",
category:
"Trigger")]
59 ref array<ref SCR_ScenarioFrameworkActionBase> m_aEntityEnteredActions;
61 [
Attribute(
desc:
"Actions that will be activated when entity that went through the filter left the trigger",
category:
"Trigger")]
62 ref array<ref SCR_ScenarioFrameworkActionBase> m_aEntityLeftActions;
64 [
Attribute(
desc:
"Actions that will be activated when all conditions are met and Trigger finishes",
category:
"Trigger")]
65 ref array<ref SCR_ScenarioFrameworkActionBase> m_aFinishedActions;
77 IEntity entity =
object.GetSpawnedEntity();
86 if (!BaseGameTriggerEntity.Cast(entity))
88 Print(
"ScenarioFramework: SlotTrigger - The selected prefab is not trigger!",
LogLevel.ERROR);
95 SCR_FactionAliasComponent factionAliasComponent = SCR_FactionAliasComponent.Cast(
GetGame().GetFactionManager().FindComponent(SCR_FactionAliasComponent));
96 if (factionAliasComponent)
97 m_sActivatedByThisFaction = factionAliasComponent.ResolveFactionAlias(m_sActivatedByThisFaction);
101 trigger.SetSphereRadius(m_fAreaRadius);
112 trigger.SetUpdateRate(m_fUpdateRate);
129 factionTrigger.SetSphereRadius(m_fAreaRadius);
130 FactionManager factionManager =
GetGame().GetFactionManager();
132 factionTrigger.AddOwnerFaction(m_sActivatedByThisFaction);
140 super.OnWBKeyChanged(
object);
141 object.SetDebugShapeSize(m_fAreaRadius);
146 override array<ref SCR_ScenarioFrameworkActionBase>
GetActions()
148 array<ref SCR_ScenarioFrameworkActionBase> combinedActions = {};
152 combinedActions.Insert(action);
157 combinedActions.Insert(action);
162 combinedActions.Insert(action);
165 return combinedActions;
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.