noctara Posted March 8, 2012 Share Posted March 8, 2012 (edited) Hi folks, First, I am a total noob in both the creation kit and programming so please be gentle :ohdear: basically what i want to do: event onactivate (game.getplayer()) game.showsleepwaitmenu() end event for some reason i can't get my script to compile. The creation kit keeps saying that the variable sleepwaitmenu is not defined. Does anybody have an idea or experience in how to make this working? Edit: I made the script to extend actor (maybe thats wrong as well ) Any help would be appreciated :biggrin: Edited March 8, 2012 by noctara Link to comment Share on other sites More sharing options...
GomuGomu64 Posted March 8, 2012 Share Posted March 8, 2012 (edited) We'll need the entirety of your script if you even want there to be no conflicts. Edited March 8, 2012 by GomuGomu64 Link to comment Share on other sites More sharing options...
noctara Posted March 8, 2012 Author Share Posted March 8, 2012 Ok, basically what i want to do, is to create a new furniture object.. in this case a bed. I thought it'll be possible (or at least is a start) if i can trigger the menu on activate. So i wanted to keep it small and simple for a start.Right now the script looks like this: Scriptname TestMod02CoffinActivatorScript extends Objectreference import debugimport utilityimport game ObjectReference property objSelf auto hidden Event OnActivate(ObjectReference akActionRef) if (akActionRef == Game.GetPlayer()) Trace("Aktiviert von mir") game.ShowSleepWaitMenu() endif endEvent The compiler says that "ShowSleepWaitMenu" is not a function and needs to be called on a variable.If I replace "ShowSleepWaitMenu" with "ShowRaceMenu" it compiles just fine (didn't test it ingame yet).I have the feeling that its because "ShowSleepWaitMenu" is not a function of the game script... however, where would i find it then? Is it even accessible??I am a little lost here :whistling: Link to comment Share on other sites More sharing options...
GomuGomu64 Posted March 8, 2012 Share Posted March 8, 2012 Your over-thinking it. Duplicate a normal bed (Any), replace the .nif file with the object you want and your done. Link to comment Share on other sites More sharing options...
noctara Posted March 8, 2012 Author Share Posted March 8, 2012 (edited) I tried that... i wont even be able activate it then... maybe because of the collision??also just tried the racemenu ingame... works just fineI got a temporary solution with just hiding a scaled-down bedroll in the coffin... but i would like to do it properly if it can be done.If u think a little out of the box there are just so many possibilties here :biggrin: Edit: in further steps i want to add some animations before entering the sleepmenu Edited March 8, 2012 by noctara Link to comment Share on other sites More sharing options...
kromey Posted March 9, 2012 Share Posted March 9, 2012 Where did you find ShowSleepWaitMenu? So far as I can tell (via the CK wiki) there is no such Papyrus function. I'm not aware of any other way to invoke this via a script. One thing you might try is to put a bed nearby your new activator, but somewhere hidden (e.g. under the floor). Then make your OnActivate event activate the bed: ObjectReference property myRealBed auto ;make sure you connect this to a real bed somewhere Event OnActivate(ObjectReference akActionRef) debug.messagebox("Activated!") myRealBed.activate(akActionRef) endEvent This pretty much just passes along your activate event straight to the actual bed. Link to comment Share on other sites More sharing options...
noctara Posted March 9, 2012 Author Share Posted March 9, 2012 Thx kromey! ur idea sounds good to me.. i will try it today when i am back from work.I figured, that "show" is the command to make menus display via script and thought it'll be possible to display the "sleepwaitmenu.swf" with this command.For me it seems pretty strange that you can literally make any menu display with this command... just not the sleepwaitmenu... why would u exclude this menu??? Link to comment Share on other sites More sharing options...
noctara Posted March 10, 2012 Author Share Posted March 10, 2012 Update: Everything working well so far :thumbsup: ty again kromeyI added an (3rd person) animation which makes my char -wave- before entering the bed. :laugh: Next step is to attach the -real- (laying down) animation. Link to comment Share on other sites More sharing options...
Recommended Posts