Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionAddTaskProgress.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_ContainerActionTitle
()]
2
class
SCR_ScenarioFrameworkActionAddTaskProgress
:
SCR_ScenarioFrameworkActionBase
3
{
4
[
Attribute
(
desc
:
"Which task to work with - Use GetTask"
)]
5
ref
SCR_ScenarioFrameworkGetTask
m_Getter;
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
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
OnActivate
override void OnActivate()
Definition
SCR_CharacterCommandLoiter.c:31
GetName
string GetName()
Definition
SCR_NotificationSenderComponent.c:15
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
task
from task
Definition
SCR_TaskNotificationConfigs.c:12
IEntity
Definition
IEntity.c:13
SCR_ContainerActionTitle
Definition
SCR_ContainerActionTitle.c:2
SCR_ScenarioFrameworkActionAddTaskProgress
Definition
SCR_ScenarioFrameworkActionAddTaskProgress.c:3
SCR_ScenarioFrameworkActionBase
Definition
SCR_ScenarioFrameworkActionBase.c:3
SCR_ScenarioFrameworkGetTask
Definition
SCR_ScenarioFrameworkGetTask.c:3
SCR_ScenarioFrameworkTask
Definition
SCR_ScenarioFrameworkTask.c:6
UIWidgets
Definition
attributes.c:40
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
ScenarioFramework
Actions
SCR_ScenarioFrameworkActionAddTaskProgress.c
Generated by
1.17.0