UpdateSeeYouSleepQuest.Sleepnvde = 0
UpdateSeeYouSleepQuest is the name of my quest, Sleepnvde is the name of my variable. Is there a problem using a magic effect for this?
Scriptname SeeYouSleepMenuEffectScript extends activemagiceffect UpdateSeeYouSleepQuestScript Property UpdateSeeYouSleepQuest AutoMessage Property SeeYouSleepMenu AutoEvent OnEffectStart (Actor akTarget, Actor akCaster) SeeYouSleepMenuFunction()EndEventFunction SeeYouSleepMenuFunction(Bool abMenu = True, Int aiButton = 0) While abMenu If (aiButton != -1) ; Wait for input aiButton = SeeYouSleepMenu.Show() ; Main Menu abMenu = False ; End the function If (aiButton == 0) ; Sleep Wear Options debug.notification("Player set to sleep nvde") UpdateSeeYouSleepQuest.Sleepnvde = 1 ;endif ;aiButton = SleepWearOptions.Show() ;If (aiButton == 0) ; Default. Nothing Changes. UpdateSeeYouSleepQuest.Sleepnvde = 0 ;ElseIf (aiButton == 1) ; Sleep in the nvde. ;UpdateSeeYouSleepQuest.Sleepnvde = 1 ;ElseIf (aiButton == 2) ; Take off helmet and weapons. ;UpdateSeeYouSleepQuest.Sleepnvde = 3 ;ElseIf (aiButton == 3) ; Wear Special Outfit. ;EndIf ElseIf (aiButton == 1) ; Followers Sleep Undressed? debug.notification("Button 2 pressed") ;aiButton = LunchMESG.Show() ;If (aiButton == 0) ; Glazed Turkey Sandwich ;ElseIf (aiButton == 1) ; Grilled Ham Sandwich ;ElseIf (aiButton == 2) ; Shredded Pony Sandwich ;EndIf ElseIf (aiButton == 2) ; How long to lay in bed before getting up? debug.notification("Button 3 pressed") ;aiButton = DinnerMESG.Show() ;If (aiButton == 0) ; Filet Mignon ;ElseIf (aiButton == 1) ; Pony Fajitas ;ElseIf (aiButton == 2) ; Lobster ;EndIf ElseIf (aiButton == 3) ; Exit debug.notification("Button 4 pressed") ;aiButton = DinnerMESG.Show() ;If (aiButton == 0) ; Filet Mignon ;ElseIf (aiButton == 1) ; Pony Fajitas ;ElseIf (aiButton == 2) ; Lobster ;EndIf EndIf EndIf EndWhileEndFunctionWHen I click the button, I see my debug notification just fine, yet my debug text in my quest, keeps reporting the value of Sleepnvde at 0.Here is the script on my Quest:
Scriptname UpdateSeeYouSleepQuestScript extends Quest ConditionalQuest Property SeeYouSleepQuest AutoInt Property Sleepnvde Auto ConditionalInt Property DoOnce AutoSpell Property SeeYouSleepMenuSpell AutoEvent OnInit() RegisterForSingleUpdate(5)EndEventEvent OnUpdate() Debug.Notification("Sleepnvde variable is " +Sleepnvde) SeeYouSleepQuest.Stop() SeeYouSleepQuest.Start() RegisterForSingleUpdate(5) If DoOnce == 0 Game.GetPlayer().AddSpell(SeeYouSleepMenuSpell) DoOnce = 1 EndifEndEvent