cdcooley Posted July 20, 2016 Share Posted July 20, 2016 Yes, I didn't test enough to think about blocking when in menus. Shame on me. Chesko tests every menu individually but leaves out some important checks. Here's what I should have put in it. You shouldn't be able to cast these if controls are disabled, if the player is already sitting or riding, if any sort of text input box is open, if any of the standard menus are open, or if your using a crafting station or talking to someone. That's still quite a few checks, but at least IsInMenuMode can check against most of the standard menus with a single function call. if Game.IsActivateControlsEnabled() && PlayerRef.GetSitState() == 0 && !PlayerRef.IsOnMount() && !Utility.IsInMenuMode() && !UI.IsTextInputEnabled() && !UI.IsMenuOpen("Crafting Menu") && !UI.IsMenuOpen("Dialogue Menu") SitPower[SitKey.Find(code)].Cast(PlayerRef) endif Link to comment Share on other sites More sharing options...
Huillam Posted July 20, 2016 Author Share Posted July 20, 2016 That's much shorter. Sir you're awesome! And so is IsharaMeradin. Thanks again to the both of you. :smile: Link to comment Share on other sites More sharing options...
Recommended Posts