- Scriptname aaaHijackDeathScript extends Quest
- ActorBase Property pPlayer Auto
- Actor Property PlayerRef Auto
- EffectShader Property decayEffect Auto
- EffectShader Property decayEffect2 Auto
- Sound Property pDeathFXSound Auto
- ObjectReference Property fallBackSite Auto
- ObjectReference Property pSpawnPoint Auto
- ObjectReference Property pDeathStorage Auto
- ObjectReference Property pPanicStorage Auto
- ObjectReference Property pDeathMark Auto
- ObjectReference Property pDeathMarkFX Auto
- Event OnInit()
- pPlayer.SetEssential(true)
- RegisterForSingleUpdate(1.0)
- ;Debug.Notification("You have been cursed.")
- pSpawnPoint.MoveTo(fallBackSite)
- EndEvent
- Event OnUpdate()
- If PlayerRef.IsBleedingOut() == True
- disNiggaDed()
- Else
- RegisterForSingleUpdate(1.0)
- ;Debug.Notification("Registering again...")
- EndIf
- EndEvent
- Function disNiggaDed()
- deathFX()
- Utility.Wait(5)
- pDeathStorage.RemoveAllItems(pPanicStorage, true)
- PlayerRef.RemoveAllItems(pDeathStorage, true)
- pDeathMark.MoveTo(PlayerRef, abMatchRotation = false)
- pDeathMarkFX.MoveTo(pDeathMark, abMatchRotation = false)
- reBirth()
- EndFunction
- Function deathFX()
- ;Debug.MessageBox("Starting Death Effects")
- Debug.Notification("Your vessel has broken. Attempting to reintegrate at Shrine of Arkay...")
- Game.DisablePlayerControls()
- PlayerRef.SetNoBleedoutRecovery(true)
- Utility.Wait(3.5)
- PlayerRef.SetAlpha(0, true)
- decayEffect.Play(PlayerRef)
- Utility.Wait(2.0)
- pDeathFXSound.Play(PlayerRef)
- decayEffect2.Play(PlayerRef, 5.0)
- Game.FadeOutGame(true, true, 5.0, 5.0)
- EndFunction
- Function reBirth()
- PlayerRef.SetNoBleedoutRecovery(False)
- Game.EnablePlayerControls()
- PlayerRef.RestoreAV("Health", 100)
- ;Debug.MessageBox("You should now be reborn")
- PlayerRef.MoveTo(pSpawnPoint)
- decayEffect.Stop(PlayerRef)
- decayEffect2.Stop(PlayerRef)
- Utility.Wait(10)
- PlayerRef.SetAlpha(1, true)
- RegisterForSingleUpdate(1.0)
- ;Debug.MessageBox("Update Registered.")
- EndFunction