Prevent teleportation, when Calia, Jespar, or Esme follow player

This commit is contained in:
Eddoursul 2024-02-14 13:37:23 +01:00
parent 6f81c851f8
commit e28e8a1164
5 changed files with 20 additions and 3 deletions

BIN
Companion list.esp Normal file

Binary file not shown.

View File

@ -6,7 +6,14 @@ Scriptname _00E_Teleport_SuntempleME extends activemagiceffect
Event OnEffectStart (Actor akTarket, Actor akCaster) Event OnEffectStart (Actor akTarket, Actor akCaster)
If (_00E_TeleportGlobal.GetValueInt() == 1 && !(MQ12b.IsRunning())) || PlayerREF.GetWorldSpace() == Akropolis || MQ03.GetCurrentStageID() < 30 bool bHasCompanion = false
int i = NoTeleportCompanions.GetSize()
while i > 0 && ! bHasCompanion
i -= 1
bHasCompanion = (NoTeleportCompanions.GetAt(i) as Actor).IsPlayerTeammate()
endwhile
If bHasCompanion || (_00E_TeleportGlobal.GetValueInt() == 1 && ! MQ12b.IsRunning()) || PlayerREF.GetWorldSpace() == Akropolis || MQ03.GetCurrentStageID() < 30
_00E_Teleport_sTeleportNotPossible.Show() _00E_Teleport_sTeleportNotPossible.Show()
MAGVampireSunlight.Play(PlayerREF) MAGVampireSunlight.Play(PlayerREF)
PlayerREF.AddItem(_01E_TeleportrolleSonnentempel, 1) PlayerREF.AddItem(_01E_TeleportrolleSonnentempel, 1)
@ -40,3 +47,5 @@ ObjectReference Property _00E_TeleportMarker_Suntemple Auto
Message Property _00E_Teleport_sTeleportNotPossible Auto Message Property _00E_Teleport_sTeleportNotPossible Auto
Scroll Property _01E_TeleportrolleSonnentempel Auto Scroll Property _01E_TeleportrolleSonnentempel Auto
Formlist Property NoTeleportCompanions Auto

View File

@ -7,7 +7,14 @@ Scriptname _00E_TeleportationMEScript extends activemagiceffect
Event OnEffectStart (Actor akTarket, Actor akCaster) Event OnEffectStart (Actor akTarket, Actor akCaster)
If (_00E_TeleportGlobal.GetValueInt() == 1) || (PlayerREF.GetWorldSpace() == Akropolis) bool bHasCompanion = false
int i = NoTeleportCompanions.GetSize()
while i > 0 && ! bHasCompanion
i -= 1
bHasCompanion = (NoTeleportCompanions.GetAt(i) as Actor).IsPlayerTeammate()
endwhile
If bHasCompanion || (_00E_TeleportGlobal.GetValueInt() == 1) || (PlayerREF.GetWorldSpace() == Akropolis)
_00E_Teleport_sTeleportNotPossible.Show() _00E_Teleport_sTeleportNotPossible.Show()
MAGVampireSunlight.Play(PlayerREF) MAGVampireSunlight.Play(PlayerREF)
MagicEffect CastedMGEF = Self.GetBaseObject() MagicEffect CastedMGEF = Self.GetBaseObject()
@ -48,6 +55,7 @@ Cell Property ability_container Auto
Formlist Property _00E_TeleportScroll_List Auto Formlist Property _00E_TeleportScroll_List Auto
Formlist Property _00E_TeleportScrollMGEF_List Auto Formlist Property _00E_TeleportScrollMGEF_List Auto
Formlist Property NoTeleportCompanions Auto
Actor Property PlayerREF Auto Actor Property PlayerREF Auto