Citizenbari Posted March 7, 2020 Share Posted March 7, 2020 Hi, i need help again... The following script does not work (compile) for Fallout 4. I tried to get a script that turns on/off lights due to weather conditions. Rainy weather should turn on the lights and no more raining turn off the lights. If someone knows how this script should look like or has an funtioning script that turns lights on/off depending on weather conditions -> very happy!!!! Scriptname CBJE_LightOnWeather extends ObjectReferenceObjectReference Property MainLight AutoEvent OnInit() Self.StartTimer(1, 0)EndEventEvent OnTimer(int aiTimerID) If (Weather.GetCurrentWeather().GetClassification() == 2) GoToState("LightsOn") Else GoToState("LightsOff") EndIf Self.StartTimer(1, aiTimerID)EndEventEvent OnLoad() Self.StartTimer(1, 0)EndEventEvent OnUnload() Self.CancelTimer(0)EndEventState LightsOn Event OnBeginState() MainLight.Enable() EndEventEndStateState LightsOff Event OnBeginState() MainLight.Disable() EndEventEndState Link to comment Share on other sites More sharing options...
Recommended Posts