Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkWeatherCondition.c
Go to the documentation of this file.
3{
4 [Attribute(defvalue: "0", desc: "Minimal wind speed in meters per second", params: "0 100 0.001", precision: 3, category: "Wind")]
5 float m_fMinWindSpeed;
6
7 [Attribute(defvalue: "20", desc: "Maximal wind speed in meters per second", params: "0 100 0.001", precision: 3, category: "Wind")]
8 float m_fMaxWindSpeed;
9
10 [Attribute(defvalue: "0", desc: "Minimal rain intensity", params: "0 1 0.001", precision: 3, category: "Rain")]
11 float m_fMinRainIntensity;
12
13 [Attribute(defvalue: "1", desc: "Maximal rain intensity", params: "0 1 0.001", precision: 3, category: "Rain")]
14 float m_fMaxRainIntensity;
15
16 //------------------------------------------------------------------------------------------------
17 override bool Init(IEntity entity)
18 {
19 // Here you can debug specific Condition instance.
20 // This can be also adjusted during runtime via Debug Menu > ScenarioFramework > Condition Inspector
21 if (m_bDebug)
22 Print("[SCR_ScenarioFrameworkWeatherCondition.Init] debug line (" + __FILE__ + " L" + __LINE__ + ")", LogLevel.WARNING);
23
24 ChimeraWorld world = ChimeraWorld.CastFrom(entity.GetWorld());
25 if (!world)
26 return true;
27
28 TimeAndWeatherManagerEntity manager = world.GetTimeAndWeatherManager();
29 if (!manager)
30 return true;
31
32 float currentWindSpeed = manager.GetWindSpeed();
33 if (currentWindSpeed < m_fMinWindSpeed || currentWindSpeed > m_fMaxWindSpeed)
34 return false;
35
36 float currentRainIntensity = manager.GetRainIntensity();
37 if (currentRainIntensity < m_fMinRainIntensity || currentRainIntensity > m_fMaxRainIntensity)
38 return false;
39
40 return true;
41 }
42}
override void Init()
params precision
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
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