How to put rapid fire and quick recharge mod?
5 posts
• Page 1 of 1
How to put rapid fire and quick recharge mod?
Hello, someone knows how could put, rapid fire and quick recharge in this script?
Thanks in advance.
PS: change from automatic to semiautomatic I have no idea how.
I wish it were normally turned off and be activated by pressing L2 + above to disable L2 + down
- Code: Select all
// Use the Xbox One controller on PS4
// View + Menu should active PS4 Touch click
// View triggers the PS4 Share button if held donw for more than half second
// And "Hair-Trigger" MOD
#include <xb1.gph> // for XB1
#include <ps4.gph> // for PS4
bool inhibit_share = FALSE;
#define TRUE !FALSE
main {
if(get_val(XB1_P4)) {
set_val(PS4_CIRCLE, 100);
set_val(XB1_P4, 0);
}
if(get_val(XB1_P2)) {
set_val(PS4_CROSS, 100);
set_val(XB1_P2, 0);
}
if(get_val(XB1_VIEW)) {
if(time_active(XB1_VIEW) < 1000 || inhibit_share) {
set_val(XB1_VIEW, 0);
if(get_val(XB1_MENU)) {
inhibit_share = TRUE;
set_val(XB1_MENU, 0);
set_val(PS4_TOUCH, 100);
}
}
} else inhibit_share = FALSE;
if(get_val(XB1_LT)) {
set_val(PS4_L2, 100);
}
if(get_val(XB1_RT)) {
set_val(PS4_R2, 100);
}
}
init {
port_inhibit_ffb(PORT_USB_B);
}
Thanks in advance.
PS: change from automatic to semiautomatic I have no idea how.
I wish it were normally turned off and be activated by pressing L2 + above to disable L2 + down
-
Racing - Sergeant Major
- Posts: 106
- Joined: Thu May 26, 2016 4:18 pm
Re: How to put rapid fire and quick recharge mod?
I don't know what "quick recharge" is meant to be doing.
For rapid fire try this one:
For rapid fire try this one:
- Code: Select all
// Use the Xbox One controller on PS4
// View + Menu should active PS4 Touch click
// View triggers the PS4 Share button if held donw for more than half second
// And "Hair-Trigger" MOD
#include <xb1.gph> // for XB1
#include <ps4.gph> // for PS4
#define TRUE !FALSE
bool inhibit_share = FALSE;
bool rapid_on = FALSE;
uint8 FIRE_HOLD_RAPID = 20;
uint8 FIRE_WAIT_RAPID = 20;
init {
port_inhibit_ffb(PORT_USB_B);
}
main {
if(get_val(XB1_P4)) {
set_val(PS4_CIRCLE, 100);
set_val(XB1_P4, 0);
}
if(get_val(XB1_P2)) {
set_val(PS4_CROSS, 100);
set_val(XB1_P2, 0);
}
if(get_val(XB1_VIEW)) {
if(time_active(XB1_VIEW) < 1000 || inhibit_share) {
set_val(XB1_VIEW, 0);
if(get_val(XB1_MENU)) {
inhibit_share = TRUE;
set_val(XB1_MENU, 0);
set_val(PS4_TOUCH, 100);
}
}
} else inhibit_share = FALSE;
if(get_val(XB1_LT)) {
set_val(PS4_L2, 100);
}
if(get_val(XB1_RT)) {
set_val(PS4_R2, 100);
}
// on / off rapid fire
if(get_val(PS4_L2) && is_active(PS4_UP)) rapid_on = TRUE;
else if(get_val(PS4_L2) && is_active(PS4_DOWN)) rapid_on = FALSE;
// or the one below to toggle on/off with hold L2 + press up (remove the two above then)
//if(get_val(PS4_L2) && event_active(PS4_UP)) rapid_on = !rapid_on;
// use rapid fire
if (get_val(PS4_R2) && rapid_on) combo_run(RapidFire);
}
// rapid fire
combo RapidFire {
set_val(PS4_R2, 100);
wait(FIRE_HOLD_RAPID);
set_val(PS4_R2, 0);
wait(FIRE_WAIT_RAPID);
set_val(PS4_R2, 0);
}
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: How to put rapid fire and quick recharge mod?
Thanks Scachi, what I mean with quick recharge, is that if it takes a gun to reload 4 seconds, that it takes 2, for example (which is an X value for all weapons).
PS: in this rapid fire script, I have to change anything, if I use with Elite controller?
Thanks in advance.
PS: in this rapid fire script, I have to change anything, if I use with Elite controller?
Thanks in advance.
-
Racing - Sergeant Major
- Posts: 106
- Joined: Thu May 26, 2016 4:18 pm
Re: How to put rapid fire and quick recharge mod?
It should work with any controller as long as the button mapping is correct.
Sorry, I can't help with your quick recharge. You have to look it up if anything like that exists for the game you are looking for. This seems to be very game specific.
Sorry, I can't help with your quick recharge. You have to look it up if anything like that exists for the game you are looking for. This seems to be very game specific.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: How to put rapid fire and quick recharge mod?
Thanks will try to take as an example your script The division to change the fire mode or there if I can implement as this in Destiny and Borderlands.
-
Racing - Sergeant Major
- Posts: 106
- Joined: Thu May 26, 2016 4:18 pm
5 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 141 guests