Zorkaz Posted May 14, 2021 Share Posted May 14, 2021 I'm a bit confused about this process I want the player to receive a spell when they go to sleep. But where would I put Function SleepFunction() RegisterForSleep() EndFunctionAnd the following Event? In the Magic Effect script? Link to comment Share on other sites More sharing options...
dylbill Posted May 14, 2021 Share Posted May 14, 2021 You can put that on any form. I'd recommend maybe putting it on a quest script. Example: Spell Property MySpell Auto Event OnQuestInit() RegisterForPlayerSleep() EndEvent Event OnPlayerSleepStart(float afSleepStartTime, float afDesiredSleepEndTime, ObjectReference akBed) Game.GetPlayer().AddSpell(MySpell) UnRegisterForPlayerSleep() EndEvent Link to comment Share on other sites More sharing options...
Zorkaz Posted May 14, 2021 Author Share Posted May 14, 2021 Ah, thank you Link to comment Share on other sites More sharing options...
dylbill Posted May 14, 2021 Share Posted May 14, 2021 No problem Link to comment Share on other sites More sharing options...
Recommended Posts