Bo4 Reload Cancel script help
5 posts
• Page 1 of 1
Bo4 Reload Cancel script help
I have attempted to create a short script to cancel reload in BO4 if I press the RT. For obvious reasons I would like to
cancel the reload if caught off guard and need to fire at an enemy in a pinch. I know Melee and YY will cancel reload. I chose YY since I don't want the added delay and interference with Melee.
I put together this short script but seem to get an error which doesn't make sense to me. The error describes my script as more than necessary but the script so short and the scripting elements needed, as far as I can tell to make it work.
Anyways, anyone's help would be appreciated. I know pabloscripts has a BO4 gamepack with this feature but I have a fairly complicated BO4 script that handles many intricate macro's that are custom to how I play. I want to add this small feature but my Cancel Reload script comes back with an error that I cannot figure out why.
The error and script follows. By the way, I can put any # (0-100) in the get_val RT but makes no difference.
GPC error: BO3-4T-Aggregate.gpc(170): More than necessary 1 argument(s) in macro call "get_val(XB1_RT , 1 )" macro "get_val" defined as: #define get_val(a) ( ( int ) get_val ( _ot_i [ a ] ) ) /* C:/Program Files (x86)/GTunerFiles/include/titanone.gph:480 */
cancel the reload if caught off guard and need to fire at an enemy in a pinch. I know Melee and YY will cancel reload. I chose YY since I don't want the added delay and interference with Melee.
I put together this short script but seem to get an error which doesn't make sense to me. The error describes my script as more than necessary but the script so short and the scripting elements needed, as far as I can tell to make it work.
Anyways, anyone's help would be appreciated. I know pabloscripts has a BO4 gamepack with this feature but I have a fairly complicated BO4 script that handles many intricate macro's that are custom to how I play. I want to add this small feature but my Cancel Reload script comes back with an error that I cannot figure out why.
The error and script follows. By the way, I can put any # (0-100) in the get_val RT but makes no difference.
GPC error: BO3-4T-Aggregate.gpc(170): More than necessary 1 argument(s) in macro call "get_val(XB1_RT , 1 )" macro "get_val" defined as: #define get_val(a) ( ( int ) get_val ( _ot_i [ a ] ) ) /* C:/Program Files (x86)/GTunerFiles/include/titanone.gph:480 */
- Code: Select all
// CANCEL RELOAD
if(check_release(XB1_X, 300) && get_val(XB1_RT,1)){
combo_run(CANCELR);
}
combo CANCELR {
set_val(XB1_Y,0);
set_val(XB1_Y,100);
wait (10);
set_val(XB1_Y,0);
wait(10);
set_val(XB1_Y,100);
wait(10);
-
Syndicate HD - Staff Sergeant
- Posts: 12
- Joined: Thu Oct 04, 2018 4:26 pm
Re: Bo4 Reload Cancel script help
get_val only support one argument to read the value of a button.
set_val requires a second argument, but that is used to set the button to a value.
Change that line to this:
if you want it to compare to some specific value you have to do that after the get_val like this:
set_val requires a second argument, but that is used to set the button to a value.
Change that line to this:
- Code: Select all
if(check_release(XB1_X, 300) && get_val(XB1_RT)){
if you want it to compare to some specific value you have to do that after the get_val like this:
- Code: Select all
if(check_release(XB1_X, 300) && get_val(XB1_RT) > 10.0){
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Bo4 Reload Cancel script help
Thanks for your input and clarification.
Turns out my initial thought on how to accomplish cancel reload didn't pan out. I did finally figure it out and got it working.
Again, I appreciate your help.
Turns out my initial thought on how to accomplish cancel reload didn't pan out. I did finally figure it out and got it working.
Again, I appreciate your help.
-
Syndicate HD - Staff Sergeant
- Posts: 12
- Joined: Thu Oct 04, 2018 4:26 pm
Re: Bo4 Reload Cancel script help
FYI - BO4 added an option within the game to now to allow for sprint reload cancel.
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
Re: Bo4 Reload Cancel script help
Wow this is a complicated bit of code to get right! Read about my journey here:
viewtopic.php?f=23&t=9965&p=73333#p73333
viewtopic.php?f=23&t=9965&p=73333#p73333
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR
My R6 script: https://youtu.be/x-9NtxyySVM
My R6 script: https://youtu.be/x-9NtxyySVM
-
pablosscripts - Brigadier General
- Posts: 1976
- Joined: Tue Nov 24, 2015 6:27 am
5 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 118 guests