Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionResetCounter.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Counter to reset (Optional if this action is attached on Counter)")]
5 string m_sCounterName;
6
7 //------------------------------------------------------------------------------------------------
8 override void OnActivate(IEntity object)
9 {
10 if (!CanActivate())
11 return;
12
13 SCR_ScenarioFrameworkLogicCounter logicCounter;
14 if (SCR_StringHelper.IsEmptyOrWhiteSpace(m_sCounterName))
15 {
16 if (!object)
17 {
18 PrintFormat("ScenarioFramework Action: Logic Counter not found for Action %1", this, LogLevel.ERROR);
19 return;
20 }
21
22 logicCounter = SCR_ScenarioFrameworkLogicCounter.Cast(object);
23 if (!logicCounter)
24 {
25 PrintFormat("ScenarioFramework Action: Logic Counter %1 not found for Action %2", object.GetName(), this, LogLevel.ERROR);
26 return;
27 }
28 }
29 else
30 {
31 IEntity entity = GetGame().GetWorld().FindEntityByName(m_sCounterName);
32 if (!entity)
33 {
34 PrintFormat("ScenarioFramework Action: Could not find %1 for Action %2", m_sCounterName, this, LogLevel.ERROR);
35 return;
36 }
37
38 logicCounter = SCR_ScenarioFrameworkLogicCounter.Cast(entity);
39 if (!logicCounter)
40 {
41 PrintFormat("ScenarioFramework Action: Logic Counter %1 not found for Action %2", m_sCounterName, this, LogLevel.ERROR);
42 return;
43 }
44 }
45
46 logicCounter.Reset();
47 }
48}
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
override void OnActivate()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external BaseWorld GetWorld()
static bool IsEmptyOrWhiteSpace(string input)
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
SCR_FieldOfViewSettings Attribute