Hi, I'm tryng to set up a shrine that gives giving me the choice to decide through a menu the blessing I prefer once I activate it. My script is some sort of a patchwork and obviously doesn't work.
Scriptname BlessingMenuTest extends ObjectReference
Message Property NocturnalMessage Auto
Message Property BlessingMessage Auto
Message Property AltarRemoveMsg Auto
Spell Property TempleBlessing01 Auto
Spell Property TempleBlessing02 Auto
Spell Property TempleBlessing03 Auto
Spell Property TempleBlessing04 Auto
Event OnActivate(ObjectReference akActionRef)
Menu()
EndEvent
Function Menu(Int aiButton = 0) ; The menu will exit on its own after a selection is made.
aiButton = NocturnalMessage.Show() ; Shows your menu.
If aiButton == 0
ElseIf aiButton == 1
TempleBlessing01.Cast(akActionRef, akActionRef)
if akActionRef == Game.GetPlayer()
AltarRemoveMsg.Show()
BlessingMessage.Show()
EndIf
ElseIf aiButton == 2
TempleBlessing02.Cast(akActionRef, akActionRef)
if akActionRef == Game.GetPlayer()
AltarRemoveMsg.Show()
BlessingMessage.Show()
EndIf
ElseIf aiButton == 3
TempleBlessing03.Cast(akActionRef, akActionRef)
if akActionRef == Game.GetPlayer()
AltarRemoveMsg.Show()
BlessingMessage.Show()
EndIf
ElseIf aiButton == 4
TempleBlessing04.Cast(akActionRef, akActionRef)
if akActionRef == Game.GetPlayer()
AltarRemoveMsg.Show()
BlessingMessage.Show()
EndIf
EndIf
EndFunction
Every akActionRef variable is undefined and I do really hope to find some kind soul around here willing to help this poor noob sorting this script out. Many thanks.