enderalse/source/scripts/_00e_modifyweathercomplexsc.psc

48 lines
1.3 KiB
Plaintext

Scriptname _00E_ModifyWeatherComplexSC extends ObjectReference
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnTriggerEnter (ObjectReference akActionREF)
if akActionREF == PlayerREF
if (QuestToSet.GetStage() >= iMinStage) && (QuestToSet.GetStage() <= iMaxStage)
if bForceActive
WeatherToSet.ForceActive(True)
else
WeatherToSet.SetActive(True)
endif
EndIf
EndIf
EndEvent
Event OnTriggerLeave (ObjectReference akActionREF)
if akActionREF == PlayerREF
Weather.ReleaseOverride()
; SE: Weather.ReleaseOverride() alone may not trigger weather change
if WeatherToSet != None && Weather.GetCurrentWeather() == WeatherToSet && Weather.GetOutgoingWeather() == None
WeatherToSet.SetActive(False)
endif
EndIf
EndEvent
;=====================================================================================
; PROPERTIES
;=====================================================================================
bool Property bForceActive = false Auto
int Property iMinStage Auto
int Property iMaxStage Auto
Actor Property PlayerREF Auto
Weather Property WeatherToSet Auto
Quest Property QuestToSet Auto