mockba.the.borg Posted May 3, 2016 Share Posted May 3, 2016 (edited) Is there a native for that? I know we can set the behavior of the game when its window has focus or not (in setting, if it will pause or not), but I would like to verify that from inside a script. Not sure if there's a native for that. I couldn't find it. Thanks, Mockba. Edited May 3, 2016 by mockba.the.borg Link to comment Share on other sites More sharing options...
Tehelee Posted May 3, 2016 Share Posted May 3, 2016 I'm pretty sure there's a global boolean that gets updated for this, I'd try looking into that. mockba.the.borg 1 Link to comment Share on other sites More sharing options...
mockba.the.borg Posted May 4, 2016 Author Share Posted May 4, 2016 (edited) Yeah ... I had this feeling by looking at the scripts. I will do some research on that, but if you remember please let me know. Cheers, Mockba. Edited May 4, 2016 by mockba.the.borg Link to comment Share on other sites More sharing options...
Tehelee Posted May 4, 2016 Share Posted May 4, 2016 (edited) I did some poking around this morning, look into areas where the scripts use these methods: // This may actually be the method you're looking for.PLAYER::IS_SYSTEM_UI_BEING_DISPLAYED()// Doesn't imply alt-tab, but may be used in correlation with it.UI::IS_PAUSE_MENU_ACTIVE()// It's 100% not this method, it's for checking if you're playing a certain character.PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()) Edited May 4, 2016 by Tehelee mockba.the.borg 1 Link to comment Share on other sites More sharing options...
Jitnaught Posted May 4, 2016 Share Posted May 4, 2016 If there isn't a native function for this you could use GetForegroundWindow. mockba.the.borg 1 Link to comment Share on other sites More sharing options...
mockba.the.borg Posted May 5, 2016 Author Share Posted May 5, 2016 Ok ... I gave up searching for a native and/or global and implemented the ScriptHookV Keyboard Event solution (from tits SDK). It accounts for when the game windows has focus or not, so I am considering this one solved. Thanks a lot everyone who helped. Cheers, Mockba. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now