Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionChangeTaskState.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Which task to work with - Use GetTask")]
6
7 [Attribute(defvalue: SCR_ETaskState.COMPLETED.ToString(), UIWidgets.ComboBox, "Task state", "", ParamEnumArray.FromEnum(SCR_ETaskState))]
8 SCR_ETaskState m_eTaskState;
9
10 //------------------------------------------------------------------------------------------------
11 override void OnActivate(IEntity object)
12 {
13 if (!CanActivate())
14 return;
15
16 if (!m_Getter)
17 {
18 Print(string.Format("ScenarioFramework Action: Getter not found for Action %1.", this), LogLevel.ERROR);
19 return;
20 }
21
22 SCR_ScenarioFrameworkParam<IEntity> entityWrapper = SCR_ScenarioFrameworkParam<IEntity>.Cast(m_Getter.Get());
23 if (!entityWrapper)
24 {
25 Print(string.Format("ScenarioFramework Action: Issue with Getter detected for Action %1.", this), LogLevel.ERROR);
26 return;
27 }
28
29 SCR_ScenarioFrameworkTask task = SCR_ScenarioFrameworkTask.Cast(entityWrapper.GetValue());
30 if (!task)
31 {
32 if (object)
33 Print(string.Format("ScenarioFramework Action: Task not found for Action %1 attached on %2.", this, object.GetName()), LogLevel.ERROR);
34 else
35 Print(string.Format("ScenarioFramework Action: Task not found for Action %1.", this), LogLevel.ERROR);
36
37 return;
38 }
39
40 SCR_TaskSystem taskSystem = SCR_TaskSystem.GetInstance();
41 if (!taskSystem)
42 return;
43
44 SCR_ScenarioFrameworkLayerTask layerTask = task.GetLayerTask();
45 if (!layerTask)
46 return;
47
48 layerTask.ProcessLayerTaskState(m_eTaskState);
49 }
50}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
override void OnActivate()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SCR_ETaskState
Definition SCR_Task.c:3
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