Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionChangeWeather.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "The name of the weather preference as it can be found in weatherStates.conf.")]
5 string m_sWeatherPresetName;
6
7 [Attribute("0", desc: "Weather it can change during gameplay")]
8 bool m_bRandomWeatherChanges;
9
10 [Attribute(defvalue: "0", desc: "Transition Duration", params: "0 inf 0.01")]
11 float m_fTransitionDuration;
12
13 [Attribute(defvalue: "1", desc: "Automatic Wind behaviour. Untick to further tune it with other attributes.")]
14 bool m_bAutomaticWind;
15
16 [Attribute(defvalue: "0", desc: "Wind Speed", params: "0 inf 0.01")]
17 float m_fWindSpeed;
18
19 [Attribute(defvalue: "0", desc: "Wind Direction", params: "0 inf 0.01")]
20 float m_fWindDirection;
21
22 //------------------------------------------------------------------------------------------------
23 override void OnActivate(IEntity object)
24 {
25 if (!CanActivate())
26 return;
27
28 ChimeraWorld world = GetGame().GetWorld();
29 if (!world)
30 return;
31
32 TimeAndWeatherManagerEntity manager = world.GetTimeAndWeatherManager();
33 if (!manager)
34 return;
35
36 manager.ForceWeatherTo(!m_bRandomWeatherChanges, m_sWeatherPresetName, m_fTransitionDuration);
37 manager.DelayedSetWindOverride(!m_bAutomaticWind);
38
39 if (m_bAutomaticWind)
40 return;
41
42 manager.DelayedOverrideWindSpeed(m_fWindSpeed);
43 manager.DelayedOverrideWindDirection(m_fWindDirection);
44 }
45}
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
void ForceWeatherTo(bool setLooping, string weatherID=string.Empty, float transitionDuration=0, float stateDuration=0.001, int playerThatChangedWeather=0)
void DelayedSetWindOverride(bool overrideWind, int playerChangingWind=-1)
void DelayedOverrideWindSpeed(float windSpeed, int playerChangingWind=-1)
void DelayedOverrideWindDirection(float windDirection, int playerChangingWind=-1)
SCR_FieldOfViewSettings Attribute