Tefnacht Posted May 1, 2011 Share Posted May 1, 2011 Hello. That is pretty much my question. I have a quest that keeps track of GameDaysPassed and is supposed to trigger an event once a certain amount of ingame time has passed. I found four different situations: 1.) The timer runs out during GameMode. The player is just walking around, maybe shooting stuff. No problem here, once the timer runs out the event triggers. 2.)The timer runs out during MenuMode 1007 (the loading screen). The player probably just used fast travel to go somewhere. The event triggers as soon as he reaches the location and goes back into GameMode. No problem here either. 3.) The timer runs out during MenuMode 1012 (wait/sleep). The player is either waiting or sleeping. If he is sleeping (I can check that with IsPCSleeping) I can abort the sleeping process with the WakeUpPC command and then handle the event trigger in GameMode. Works like a charm. 4.) Now comes my problem. If the timer runs out in MenuMode 1012 (wait/sleep) and the player is NOT sleeping, just waiting, I cannot find a way to abort the waiting process. The GECK wiki claims that WakeUpPC would do this but it doesn't. The command is just ignored and waiting continues for as long as the player set it up. Then the event triggers once waiting is over ... which I do not like. In a worst case situation the trigger would be 23 hours too late. Its not really that big a deal ... nothing game breaking ... I just don't like it. I tried a few other things to cancel waiting. Since I use NVSE I had some other commands to experiment with. Con_CloseAllMenus managed to cancel waiting but had a lot of other undesirable results like NPCs spasming around uncontrollably afterwards or simply CTDs. Not an option. MenuTapKey to fake the player pressing the “Cancel” button didn't work either. TapControl is ignored too. That is my situation. Any idea how to cancel waiting? Another thing I noticed while tinkering around with this problem is that the IsTimePassing command doesn't do what the GECK wiki claims either. It is supposed to return 1 during MenuMode while the player either waits, sleeps or fast travels. It doesn't. It returns 1 almost all the time, only message boxes seem to make it return 0. So it seems to be a pretty useless command. Maybe I used it wrong ... who knows :) Any help is appreciated. Even if you just tell me that waiting simply cannot be aborted. Link to comment Share on other sites More sharing options...
rickerhk Posted May 1, 2011 Share Posted May 1, 2011 Looking at the NVSE headers, theres a MenuTapKey function. Did you try that one? DEFINE_INPUT(MenuTapKey, mtk, Fakes a key press for one frame in menu mode); Link to comment Share on other sites More sharing options...
Tefnacht Posted May 2, 2011 Author Share Posted May 2, 2011 Hello. Yes, I tried “MenuTapKey 18” to fake pressing the “E” button. It didn't work, the command is just ignored. I also tried “MenuHoldKey 18”, in case faking the keypress for one frame wasn't enough, then releasing the key with “MenuReleaseKey 18” during GameMode. It didn't work. However, something did happen. When the script printed the debug message to the console that it was now attempting to cancel wait, the hour indicator took a whole second longer to move down to the next hour than usual. But then it continued merrily on its way down. So I tried “HoldKey 18” and “ReleaseKey 18” just in case and of course that didn't work either. Neither did “TapControl 5”. Wait seems to be a very stubborn little menu :) Another thing I tried was using DisablePlayerControls after reading that disabling the Pipboy also disables the wait menu. Well, it does. But not if its already open. The only thing that this command did was triggering autosaving when the timer ran out (while waiting was still in progress). But the wait menu did not close and waiting continued to the end. :wallbash: Link to comment Share on other sites More sharing options...
Recommended Posts