4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

81 lines
2.3 KiB

Scriptname _00E_NQ29_Functions extends Quest
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function SpawnAshWidow()
_00E_MQ11a_MagicAnomalyScreamAM.Play(PlayerREF)
Game.ShakeCamera()
NQ29_Boss_AshWidow_REF.Enable()
Utility.Wait(1)
ObjectReference widowFurniture = NQ29_Boss_AshWidow_REF.GetLinkedRef()
If widowFurniture
; This seems to fix the occasions when the widow gets stuck underground/invisible
NQ29_Boss_AshWidow_REF.MoveTo(widowFurniture)
EndIf
NQ29_Boss_AshWidow_REF.Activate(PlayerREF)
NQ29_Boss_AshWidow_REF.PlaceAtMe(FireballStormAlduinDeathExplosion)
NQ29_Boss_AshWidow_REF.PlaceAtMe(FireStormExplosion02)
NQ29_Boss_AshWidow_REF.KnockAreaEffect(1, 512)
EndFunction
Float Property MIN_WEATHER_PERIOD = 15.0 AutoReadOnly ; In seconds
Bool bWeatherIsSet = False
Bool bWeatherReleasePending = False
Bool bWeatherReleaseAllowed = False
Function AshWidowSetWeather()
If bWeatherIsSet == False
bWeatherIsSet = True
bWeatherReleasePending = False
bWeatherReleaseAllowed = False
SkyrimDA02Weather.SetActive(True)
RegisterForSingleUpdate(MIN_WEATHER_PERIOD)
EndIf
EndFunction
Function AshWidowReleaseWeather()
If bWeatherIsSet
bWeatherReleasePending = True
_AshWidowTryReleaseWeather()
EndIf
EndFunction
Function _AshWidowTryReleaseWeather()
If bWeatherIsSet && bWeatherReleaseAllowed && bWeatherReleasePending
bWeatherIsSet = False
bWeatherReleaseAllowed = False
bWeatherReleasePending = False
Weather.ReleaseOverride()
EndIf
EndFunction
Event OnUpdate()
bWeatherReleaseAllowed = True
_AshWidowTryReleaseWeather()
EndEvent
Function Finish()
_00E_EPHandler.GiveEP(5000)
Steam.UnlockAchievement("END_MYTHS_01")
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
Actor Property PlayerREF Auto
Actor Property NQ29_Boss_AshWidow_REF Auto
Explosion Property FireballStormAlduinDeathExplosion Auto
Explosion Property FireStormExplosion02 Auto
Sound Property _00E_MQ11a_MagicAnomalyScreamAM Auto
Weather Property SkyrimDA02Weather Auto