Kanlaon Posted July 27, 2022 Posted July 27, 2022 Hello Does anybody know how to open the Sleepmenu from within a papyrus script ? I have already tried it the usual way with UI.OpenMenu ("SleepWaitMenu") but doing so - by default ? - the waitmenu is shown !! At first the difference seem only small, but the waitmenu does not fire the OnSleepstart and Onsleepstop events and is therefore unusable. I do not have knowledge about scaleform, AS3 scripts and the HUDmenus. The only thing i have found so far is a public function setsleeping in the as3 script. Anyway I do not know how to call thh function, my trial UI.OpenMenu ("SleepWaitMenu") ; TEST opens always the wait menu Var [] args = new Var[1] args [0] = True UI.Invoke("SleepWaitMenu", "root1.menu_mc.SetSleeping", args) does not work. Maybe only the path is wrong ? Any help is welcome ? Regards
Monoman1 Posted July 27, 2022 Posted July 27, 2022 perhaps a 'low tech' approach? Activate a bed in a hidden cell ?
Kanlaon Posted July 29, 2022 Author Posted July 29, 2022 On 7/27/2022 at 9:16 PM, Monoman1 said: perhaps a 'low tech' approach? Activate a bed in a hidden cell ? I want to make a FO4 mod similar to "Go to bed" in skyrim. After a few tries, I managed to run an AI package on the player that lets the player go to bed and then plays the lying down animation. If you now activate the bed, the "sleep menu" no longer opens as before instead the game engine automatically plays an animation in which the player gets up again. Therefore, another way to open the sleep menu was necessary. After the simple approach didn't work, I had already thought of a trick like this and moved an empty bed to the player. ;/ objectreference testbed = game.getformfromfile (0x01e636, "Gotosleep.esp") as objectreference testbed.MoveTo (pl_ref) testbed.activate (pl_ref) /; But this trial lets the player standup also.?
Monoman1 Posted July 29, 2022 Posted July 29, 2022 1 hour ago, Kanlaon said: But this trial lets the player standup also. Hmm. Is that standard fallout behavior? (sorry I'm a skyrim modder mostly) Perhaps some combination of: SetVehicle SetRestrained SetDontMove SetVehicle would be my best bet. Provide the bed as an argument. (not sure if fallout has these equivalents)
Kanlaon Posted July 29, 2022 Author Posted July 29, 2022 3 hours ago, Monoman1 said: Hmm. Is that standard fallout behavior? (sorry I'm a skyrim modder mostly) Perhaps some combination of: SetVehicle SetRestrained SetDontMove SetVehicle would be my best bet. Provide the bed as an argument. (not sure if fallout has these equivalents) Ok, I will try something with Setvehicle and Setrestarined. Setdontmove is not listed in the FO4 CK wiki (but sometimes functions are forgotten there !) If i could find out how the game does the call to the sleepwaitmenu.swf I would try it this way, somewhere in the EXE you can find the string "Setsleeping".
AKawaiiTent Posted July 29, 2022 Posted July 29, 2022 (edited) https://www.creationkit.com/index.php?title=UI_Script#Valid_Menu_Names says the menu name is sleep/wait menu Edited July 29, 2022 by AKawaiiTent
Kanlaon Posted July 29, 2022 Author Posted July 29, 2022 28 minutes ago, AKawaiiTent said: https://www.creationkit.com/index.php?title=UI_Script#Valid_Menu_Names says the menu name is sleep/wait menu It is Fallout 4 not skyrim, but thanks for your efforts !
AKawaiiTent Posted July 29, 2022 Posted July 29, 2022 (edited) ah crap you're right. I had fallout 4's version of that site bookmarked b4 but i just had to re-image my machine so i lost all my bookmarks :S One more problem it may be then is the furniture object your using may not have the proper tag. There's a "nowait" keyword that is applied to bed objects. that's the only other thing i can think of Edited July 29, 2022 by AKawaiiTent
Kanlaon Posted August 10, 2022 Author Posted August 10, 2022 Finally I have found a workaround doing something in papyrus while a blackscreen is shown. Not the best solution but a working solution. If someone has a practicable good idea, I can replace it in future
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now