Jump to content

"if PlayerRef.IsRunning()" and workbenches


Zorkaz

Recommended Posts

Can't wrap my head around this.

I made a script that drains AP when the player is running

 

"if PlayerRef.IsRunning"

 

 

The odd thing I discovered is that this also applies while using any workbench. Any good ideas to filter this event out?

Edit: Appearantly it also applies to sitting and I guess Furniture use in general

Link to comment
Share on other sites

Try using If PlayerRef.IsRunning() && PlayerRef.GetSitState() == 0 (not sitting). I'm pretty sure GetSitState will return 3, or something else, while using any furniture, including workbenches. I could be wrong though. If that doesn't work, you could use RegisterForMenuOpenCloseEvent https://www.creationkit.com/fallout4/index.php?title=RegisterForMenuOpenCloseEvent_-_ScriptObject

 

And OnMenuOpenCloseEvent : https://www.creationkit.com/fallout4/index.php?title=OnMenuOpenCloseEvent_-_ScriptObject

 

with a bool to detect when the menu opens and closes.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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