Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkDayTimeHourCondition.c
Go to the documentation of this file.
3{
4 [Attribute(defvalue: "0", desc: "Minimal day time hour", params: "0 24 1", category: "Time")]
5 int m_iMinHour;
6
7 [Attribute(defvalue: "24", desc: "Maximal day time hour", params: "0 24 1", category: "Time")]
8 int m_iMaxHour;
9
10 //------------------------------------------------------------------------------------------------
11 override bool Init(IEntity entity)
12 {
13 // Here you can debug specific Condition instance.
14 // This can be also adjusted during runtime via Debug Menu > ScenarioFramework > Condition Inspector
15 if (m_bDebug)
16 Print("[SCR_ScenarioFrameworkDayTimeHourCondition.Init] debug line (" + __FILE__ + " L" + __LINE__ + ")", LogLevel.WARNING);
17
18 ChimeraWorld world = ChimeraWorld.CastFrom(entity.GetWorld());
19 if (!world)
20 return true;
21
22 TimeAndWeatherManagerEntity manager = world.GetTimeAndWeatherManager();
23 if (!manager)
24 return true;
25
26 TimeContainer timeContainer = manager.GetTime();
27 int currentHour = timeContainer.m_iHours;
28
29 if (currentHour < m_iMinHour || currentHour > m_iMaxHour)
30 return false;
31
32 return true;
33 }
34}
override void Init()
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void TimeContainer(int hours=0, int minutes=0, int seconds=0)
proto external BaseWorld GetWorld()
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