Zorkaz Posted October 30, 2020 Share Posted October 30, 2020 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 More sharing options...
dylbill Posted October 30, 2020 Share Posted October 30, 2020 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 More sharing options...
Zorkaz Posted November 1, 2020 Author Share Posted November 1, 2020 PlayerRef.GetSitState() == 0 works. Thank you Link to comment Share on other sites More sharing options...
dylbill Posted November 1, 2020 Share Posted November 1, 2020 No problem, glad it works! Link to comment Share on other sites More sharing options...
Recommended Posts