Add script to switch ghost form

This commit is contained in:
fluo10 2025-03-09 13:23:53 +09:00
parent 37d88b984e
commit e1800a783c
3 changed files with 36 additions and 2 deletions

BIN
ConjurableMaid.esp (Stored with Git LFS)

Binary file not shown.

View file

@ -0,0 +1,26 @@
Scriptname FCMSpectralMaidScript extends Actor
SPELL PROPERTY pGhostAbilityNew AUTO
SPELL PROPERTY pGhostResistsAbility AUTO
GlobalVariable Property pMaidSpectralFlag Auto
FUNCTION UpdateSpectralState()
if (pMaidSpectralFlag.getValue() == 1)
SELF.addSpell(pGhostAbilityNew)
SELF.addSpell(pGhostResistsAbility)
else
SELF.removeSpell(pGhostAbilityNew)
SELF.removeSpell(pGhostResistsAbility)
endIF
EndFUNCTION
EVENT onLoad()
updateSpectralState()
ENDEVENT
EVENT onLocationChange(Location akOldLoc, Location akNewLoc)
updateSpectralState()
ENDEVENT

View file

@ -5,11 +5,16 @@ ObjectReference Property MaidHomeMarker Auto
EffectShader Property ConjureEffect Auto
;; Scene Property DLC2DremoraScene Auto
;; GlobalVariable Property DLC2DremoraForceGreet Auto
Bool Property IsSpectral Auto
Activator property ConjureEffectActivator Auto
ImageSpaceModifier property ConjureImageSpace Auto
Event OnEffectStart(actor akTarget, actor akCaster)
if (IsSpectral)
pSpectralFlag.SetValue(1)
endif
(MaidRef as actor).StopCombat()
MaidRef.Moveto(game.GetPlayer())
MaidRef.placeAtMe(ConjureEffectActivator)
@ -18,6 +23,7 @@ Event OnEffectStart(actor akTarget, actor akCaster)
EndEvent
Event OnEffectFinish(actor akTarget, actor akCaster)
pSpectralFlag.SetValue(0)
ConjureEffect.Play(MaidRef, 1)
MaidRef.Disable(true)
utility.wait(1)
@ -26,3 +32,5 @@ Event OnEffectFinish(actor akTarget, actor akCaster)
MaidRef.Enable()
EndEvent
GlobalVariable Property pSpectralFlag Auto