Special Anti-Recoil for XIM4 and XIM Apex
Re: Special Anti-Recoil for XIM4 and XIM Apex
OK tried raw key_status (keyboard.gph) with a flag, didn't work. XIN.gph got purple offsyncs too at 1000Hz, testing now at 500Hz
-
alanmcgregor - Major
- Posts: 995
- Joined: Tue Mar 27, 2018 8:38 am
Re: Special Anti-Recoil for XIM4 and XIM Apex
All right, yep. 1000Hz a no go. 500Hz works OK as far I tested no USB offsyncs purple lights.
Scachi So XIN is a more optimized than XKEYS?, I only need a event_active "key"
Or should I go with a custom function for this, like you mention?
Scachi So XIN is a more optimized than XKEYS?, I only need a event_active "key"
Or should I go with a custom function for this, like you mention?
-
alanmcgregor - Major
- Posts: 995
- Joined: Tue Mar 27, 2018 8:38 am
Re: Special Anti-Recoil for XIM4 and XIM Apex
alanmcgregor wrote:All right, yep. 1000Hz a no go. 500Hz works OK as far I tested no USB offsyncs purple lights.
Scachi So XIN is a more optimized than XKEYS?, I only need a event_active "key"
Or should I go with a custom function for this, like you mention?
Xin is using less cpu power but it is not really tested and event_release isn't as fast as with xkeys I think
yes, I would try to do this with custom code for best performance.
If only one key at a time will be pressed you can run this code:
- Code: Select all
#include "keyboard.gph"
uint8 key_check_val;
main {
if(elapsed_time()) {
key_check_val = key_check();
if(key_event_active(KEY_PAD0)) printf("KEY_PAD0");
if(key_event_active(KEY_PAD1)) printf("KEY_PAD1");
if(key_event_active(KEY_PAD2)) printf("KEY_PAD2");
if(key_event_active(KEY_PAD3)) printf("KEY_PAD3");
if(key_event_active(KEY_PAD4)) printf("KEY_PAD4");
if(key_event_active(KEY_PAD5)) printf("KEY_PAD5");
if(key_event_active(KEY_PAD6)) printf("KEY_PAD6");
if(key_event_active(KEY_PAD7)) printf("KEY_PAD7");
if(key_event_active(KEY_PAD8)) printf("KEY_PAD8");
if(key_event_active(KEY_PAD9)) printf("KEY_PAD9");
}
}
bool key_event_active(uint8 cur_key){
static uint8 prev_key;
if(cur_key == key_check_val && prev_key != cur_key) {
prev_key = cur_key;
return TRUE;
} else if(prev_key != key_check_val) prev_key = 0;
return FALSE;
}
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Special Anti-Recoil for XIM4 and XIM Apex
Thank you very much Scachi
Yep these keys are used only one at time. For selecting/loading a specific value key_status() does the job, but in case like toggles, I need more like an event_active for keys to flip/flop the flag.
For this script maybe only a key for toggle ON/OFF the script might be suitable but I will keep the regular controller combo toggle.
Even though the latest code you share uses very little CPU, I going to go very CPU frugal with this script, won't use it for one key but I certainly will, if more mods are added for in-game toggle ON/OFF :D.
You're the man
Yep these keys are used only one at time. For selecting/loading a specific value key_status() does the job, but in case like toggles, I need more like an event_active for keys to flip/flop the flag.
For this script maybe only a key for toggle ON/OFF the script might be suitable but I will keep the regular controller combo toggle.
Even though the latest code you share uses very little CPU, I going to go very CPU frugal with this script, won't use it for one key but I certainly will, if more mods are added for in-game toggle ON/OFF :D.
You're the man
-
alanmcgregor - Major
- Posts: 995
- Joined: Tue Mar 27, 2018 8:38 am
Re: Special Anti-Recoil for XIM4 and XIM Apex
UPDATE ver 3.2
+ Numeric Key Pad Support Added
Key 1 = Slot 1 - Red LED
Key 2 = Slot 2 - Green LED
Key 3 = Slot 3 - Sky Blue LED
Key 4 = Slot 4 - Orange LED
+ Numeric Key Pad Support Added
Key 1 = Slot 1 - Red LED
Key 2 = Slot 2 - Green LED
Key 3 = Slot 3 - Sky Blue LED
Key 4 = Slot 4 - Orange LED
-
alanmcgregor - Major
- Posts: 995
- Joined: Tue Mar 27, 2018 8:38 am
Re: Special Anti-Recoil for XIM4 and XIM Apex
alanmcgregor wrote:UPDATE ver 3.2
+ Numeric Key Pad Support Added
Key 1 = Slot 1 - Red LED
Key 2 = Slot 2 - Green LED
Key 3 = Slot 3 - Sky Blue LED
Key 4 = Slot 4 - Orange LED
Awesome work and almost perfect. The only thing for me now is in PUBG, the on the fly slot changes for the controller is the same as an in-game feature, namely changing the reticle colour and shape for sights/scopes. With the script running, you are no longer able to use the in-game feature, the slot change command overrides it or something. Might I suggest to be able to disable the controller on the fly slot change feature, allowing only the numpad. Its not a huge deal but perhaps something to address further down the line.
-
gasknr - Sergeant First Class
- Posts: 20
- Joined: Sun Dec 03, 2017 12:29 am
Re: Special Anti-Recoil for XIM4 and XIM Apex
Exactly. This and why can't I drive vehicles while using the script. Gasknr how do you manage to drive cars?
-
passmyclass - Corporal
- Posts: 4
- Joined: Sun Jun 30, 2019 5:40 pm
Re: Special Anti-Recoil for XIM4 and XIM Apex
passmyclass wrote:Exactly. This and why can't I drive vehicles while using the script. Gasknr how do you manage to drive cars?
Set it to ADS only
-
Tahsin - Sergeant Major
- Posts: 100
- Joined: Wed May 15, 2019 7:57 am
Re: Special Anti-Recoil for XIM4 and XIM Apex
I tried bro it does not work.
-
passmyclass - Corporal
- Posts: 4
- Joined: Sun Jun 30, 2019 5:40 pm
Re: Special Anti-Recoil for XIM4 and XIM Apex
Another big issue is if you have rapid fire on, when shooting automatic guns in pubg, it completely ruins the flow of them. It’s almost as if it’s treating already auto guns like they are single fire and it just ruins the use of this script on pubg.
Things to fix:
- still unable to drive vehicles with rapid fire enabled. Even if it’s set to ADS only.
- Rapid Fire is messing up ability to shoot already automatic guns.
Please look into this because at the moment this script is not useful for pubg.
Things to fix:
- still unable to drive vehicles with rapid fire enabled. Even if it’s set to ADS only.
- Rapid Fire is messing up ability to shoot already automatic guns.
Please look into this because at the moment this script is not useful for pubg.
-
passmyclass - Corporal
- Posts: 4
- Joined: Sun Jun 30, 2019 5:40 pm
Return to User's Script Documentation
Who is online
Users browsing this forum: No registered users and 107 guests