griffinsclaw Posted July 20, 2012 Share Posted July 20, 2012 Hi, working on my first mod with papyrus scripting. I'm wondering if there's some event I can call that will detect when the player begins and finishes waiting, similar to OnSleepStart() and OnSleepStop(). If not is there some other way for me to detect when that happens and pass it to my script? Thanks in advance. Link to comment Share on other sites More sharing options...
JackNitro Posted July 20, 2012 Share Posted July 20, 2012 I'm not that familiar with papyrus myself, but you could try using the "if" statement with the wait utility as the condition. Link to comment Share on other sites More sharing options...
griffinsclaw Posted July 20, 2012 Author Share Posted July 20, 2012 I'm not that familiar with papyrus myself, but you could try using the "if" statement with the wait utility as the condition.The wait utility is something else entirely unfortunately. It causes the script to pause for a given length of time and isn't related to the player waiting in game. Link to comment Share on other sites More sharing options...
JackNitro Posted July 20, 2012 Share Posted July 20, 2012 (edited) I'm not that familiar with papyrus myself, but you could try using the "if" statement with the wait utility as the condition.The wait utility is something else entirely unfortunately. It causes the script to pause for a given length of time and isn't related to the player waiting in game. Ah, that's what I suspected... Let me try something else - Function function name() RegisterForUpdateGameTime(1.0) ;endFunction Event OnUpdateGameTime() ; if (!Utility.IsInMenuMode()) Insert form script here endIfendEvent Remember, I don't really do scripting, so don't get mad and shout at me if what I just typed is complete crap... EDIT: If it helps, the wait procedure itself uses the following parameters:ActualSeconds value - 0.000100StopMovement value - true EDIT EDIT: If you have skse, you could also detect when the player presses the "T" key and have that trigger RegisterForUpdateGameTime. You could also use "if" and "else" in conjunction with IsInMenuMode to detect when the player leaves the wait menu and execute UnregisterForUpdateGameTime. Edited July 20, 2012 by JackNitro Link to comment Share on other sites More sharing options...
griffinsclaw Posted July 20, 2012 Author Share Posted July 20, 2012 EDIT EDIT: If you have skse, you could also detect when the player presses the "T" key and have that trigger RegisterForUpdateGameTime. You could also use "if" and "else" in conjunction with IsInMenuMode to detect when the player leaves the wait menu and execute UnregisterForUpdateGameTime. That could be a solution. I'll try to work with that, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts