Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionAddTaskProgress.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Which task to work with - Use GetTask")]
6
7 [Attribute(defvalue: "0", desc: "Progress in percent", UIWidgets.Graph, "0 100 1")]
8 float m_iPercentage;
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 task.AddTaskProgress(m_iPercentage, false);
41 }
42}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
override void OnActivate()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
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