Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionToggleLights.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Target entity to manipulate lights with (Optional if action is attached on Slot that spawns target entity)")]
5 ref SCR_ScenarioFrameworkGet m_Getter;
6
7 [Attribute(defvalue: ELightType.Head.ToString(), UIWidgets.ComboBox, desc: "Which lights to be toggled", "", ParamEnumArray.FromEnum(ELightType))]
8 ELightType m_eLightType;
9
10 [Attribute(defvalue: "1", desc: "If true, light will be turned on. Otherwise it will turn it off.")]
11 bool m_bTurnedOn;
12
13 //------------------------------------------------------------------------------------------------
14 override void OnActivate(IEntity object)
15 {
16 if (!CanActivate())
17 return;
18
19 IEntity entity;
20 if (!ValidateInputEntity(object, m_Getter, entity))
21 return;
22
24 if (!lightManager)
25 {
26 if (object)
27 Print(string.Format("ScenarioFramework Action: Light Manager Component not found for Action %1 attached on %2.", this, object.GetName()), LogLevel.ERROR);
28 else
29 Print(string.Format("ScenarioFramework Action: Light Manager Component not found for Action %1.", this), LogLevel.ERROR);
30
31 return;
32 }
33
34 lightManager.SetLightsState(m_eLightType, m_bTurnedOn);
35 }
36}
ELightType
Definition ELightType.c:8
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
override void OnActivate()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external Managed FindComponent(typename typeName)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute