Jump to content

Is there an event to check when player waits?


griffinsclaw

Recommended Posts

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

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

endIf

endEvent

 

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.000100

StopMovement 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 by JackNitro
Link to comment
Share on other sites

 

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...