very easy script request
12 posts
• Page 1 of 2 • 1, 2
very easy script request
hey guys and thanks for taking the time to look at this, i was wondering if someone was able to make a script that does the following:
The script must do the following:
whenever i push (on playstation)Square-Triangle-Circle-L1 or R1 the script must do :
R2(100ms later)Square
R2(100ms later)Triangle
R2(100ms later)Circle
R2(100ms later)L1
R2(100ms later)R1
so basicly it must when i push a button macro R2=>button so i just push 1 button instead of 2
is this possible? or are there any guides to try it myself?
any and all help is much appreciated!!
The script must do the following:
whenever i push (on playstation)Square-Triangle-Circle-L1 or R1 the script must do :
R2(100ms later)Square
R2(100ms later)Triangle
R2(100ms later)Circle
R2(100ms later)L1
R2(100ms later)R1
so basicly it must when i push a button macro R2=>button so i just push 1 button instead of 2
is this possible? or are there any guides to try it myself?
any and all help is much appreciated!!
-
waffle123 - Staff Sergeant
- Posts: 11
- Joined: Fri Oct 15, 2021 5:24 pm
Re: very easy script request
Here you go
- Code: Select all
#pragma METAINFO("Easy Script waffle123", 1, 0, "Haures")
/*
Script Version 1.0
Author: Haures
██ ██ ██████ ██ ██ ███████ ████████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
████████ ████████ ██ ██ ███████ ██████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ████ ██ ██ ████████ ████████
*/
int toggle0=FALSE; //MASTER
int toggle1=FALSE; //SQUARE
int toggle2=FALSE; //TRIANGLE
int toggle3=FALSE; //CIRLCE
int toggle4=FALSE; //L1
int toggle5=FALSE; //R1
main {
if (get_val(BUTTON_9) && event_active(BUTTON_6)) { //9=L3 + 6=R3 turns the RT + Button Combo on/off
toggle0 = !toggle0;}
///////////////////////////////////////////////
if (event_active(BUTTON_17) && toggle0) { //SQUARE
toggle1 = !toggle1; }
if (event_release(BUTTON_17)) toggle1 = FALSE; //stop repeating on release
if(toggle1) {
combo_run(SQUARE); }
///////////////////////////////////////////////
if (event_active(BUTTON_14) && toggle0) { //TRIANGLE
toggle2 = !toggle2; }
if (event_release(BUTTON_14)) toggle2 = FALSE; //stop repeating on release
if(toggle2) {
combo_run(TRIANGLE); }
///////////////////////////////////////////////
if (event_active(BUTTON_15) && toggle0) { //CIRCLE
toggle3 = !toggle3; }
if (event_release(BUTTON_15)) toggle3 = FALSE; //stop repeating on release
if(toggle3) {
combo_run(CIRCLE); }
///////////////////////////////////////////////
if (event_active(BUTTON_7) && toggle0) { //L1
toggle4 = !toggle4; }
if (event_release(BUTTON_7)) toggle4 = FALSE; //stop repeating on release
if(toggle4) {
combo_run(L1); }
///////////////////////////////////////////////
if (event_active(BUTTON_4) && toggle0) { //R1
toggle5 = !toggle5; }
if (event_release(BUTTON_4)) toggle5 = FALSE; //stop repeating on release
if(toggle5) {
combo_run(R1); }
}
///////////////////////////////////////////////
combo SQUARE { //RT 100ms later SQUARE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_17, 0.00); //SQUARE
wait(100);
set_val(BUTTON_5, 0.00); //R2
set_val(BUTTON_17, 100.00); //SQUARE
wait(100);
}
combo TRIANGLE { //RT 100ms later SQUARE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_14, 0.00); //SQUARE
wait(100);
set_val(BUTTON_5, 0.00); //R2
set_val(BUTTON_14, 100.00); //SQUARE
wait(100);
}
combo CIRCLE { //RT 100ms later SQUARE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_15, 0.00); //SQUARE
wait(100);
set_val(BUTTON_5, 0.00); //R2
set_val(BUTTON_15, 100.00); //SQUARE
wait(100);
}
combo L1 { //RT 100ms later SQUARE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_7, 0.00); //SQUARE
wait(100);
set_val(BUTTON_5, 0.00); //R2
set_val(BUTTON_7, 100.00); //SQUARE
wait(100);
}
combo R1 { //RT 100ms later SQUARE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_4, 0.00); //SQUARE
wait(100);
set_val(BUTTON_5, 0.00); //R2
set_val(BUTTON_4, 100.00); //SQUARE
wait(100);
}
- Haures
- Sergeant First Class
- Posts: 16
- Joined: Thu Sep 16, 2021 2:59 pm
- Location: Germany
Re: very easy script request
Changed the combos so that R2 is pressed all the time and fixed my comments
- Code: Select all
#pragma METAINFO("Easy Script waffle123", 1, 1, "Haures")
/*
Script Version 1.1
Author: Haures
██ ██ ██████ ██ ██ ███████ ████████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
████████ ████████ ██ ██ ███████ ██████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ████ ██ ██ ████████ ████████
*/
//Updated script
int toggle0=FALSE; //MASTER
int toggle1=FALSE; //SQUARE
int toggle2=FALSE; //TRIANGLE
int toggle3=FALSE; //CIRLCE
int toggle4=FALSE; //L1
int toggle5=FALSE; //R1
main { //9=L3 + 6=R3 turns the R2 + Button Combo on/off
if (get_val(BUTTON_9) && event_active(BUTTON_6)) {
toggle0 = !toggle0; }
///////////////////////////////////////////////
if (event_active(BUTTON_17) && toggle0) { //SQUARE
toggle1 = !toggle1; }
if (event_release(BUTTON_17)) toggle1 = FALSE; //stop repeating on release
if(toggle1) {
combo_run(SQUARE); }
///////////////////////////////////////////////
if (event_active(BUTTON_14) && toggle0) { //TRIANGLE
toggle2 = !toggle2; }
if (event_release(BUTTON_14)) toggle2 = FALSE; //stop repeating on release
if(toggle2) {
combo_run(TRIANGLE); }
///////////////////////////////////////////////
if (event_active(BUTTON_15) && toggle0) { //CIRCLE
toggle3 = !toggle3; }
if (event_release(BUTTON_15)) toggle3 = FALSE; //stop repeating on release
if(toggle3) {
combo_run(CIRCLE); }
///////////////////////////////////////////////
if (event_active(BUTTON_7) && toggle0) { //L1
toggle4 = !toggle4; }
if (event_release(BUTTON_7)) toggle4 = FALSE; //stop repeating on release
if(toggle4) {
combo_run(L1); }
///////////////////////////////////////////////
if (event_active(BUTTON_4) && toggle0) { //R1
toggle5 = !toggle5; }
if (event_release(BUTTON_4)) toggle5 = FALSE; //stop repeating on release
///////////////////////////////////////////////
}
combo SQUARE { //RT 100ms later SQUARE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_17, 0.00); //SQUARE
wait(100);
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_17, 100.00); //SQUARE
wait(100);
}
combo TRIANGLE { //RT 100ms later TRIANGLE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_14, 0.00); //TRIANGLE
wait(100);
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_14, 100.00); //TRIANGLE
wait(100);
}
combo CIRCLE { //RT 100ms later CIRCLE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_15, 0.00); //CIRCLE
wait(100);
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_15, 100.00); //CIRCLE
wait(100);
}
combo L1 { //RT 100ms later L1
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_7, 0.00); //L1
wait(100);
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_7, 100.00); //L1
wait(100);
}
combo R1 { //RT 100ms later R1
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_4, 0.00); //R1
wait(100);
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_4, 100.00); //R1
wait(100);
}
- Haures
- Sergeant First Class
- Posts: 16
- Joined: Thu Sep 16, 2021 2:59 pm
- Location: Germany
Re: very easy script request
Updated the script once again
L3 + R3 is Button Combos on/off
so you press this and then it presses R2 + Button when you press the button
L3 + R3 is Button Combos on/off
so you press this and then it presses R2 + Button when you press the button
- Code: Select all
#pragma METAINFO("Easy Script waffle123", 2, 0, "Haures")
/*
Script Version 2.0
Author: Haures
██ ██ ██████ ██ ██ ███████ ████████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
████████ ████████ ██ ██ ███████ ██████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ████ ██ ██ ████████ ████████
*/
//L3 and R3 should activate the Mod itself so when L3 and R3 got pressed it activates the Button Combos
//Updated script
int toggle0=FALSE; //MASTER toggle
//NOTE: these combos wont loop so it only happens when you press/tap the Button
main {
if (get_val(BUTTON_9) && event_active(BUTTON_6)) { //9=L3 + 6=R3 turns the R2 + Button Combo on/off
toggle0 = !toggle0; }
///////////////////////////////////////////////
if (event_active(BUTTON_17) && toggle0) { //SQUARE
combo_run(SQUARE); }
///////////////////////////////////////////////
if (event_active(BUTTON_14) && toggle0) { //TRIANGLE
combo_run(TRIANGLE); }
///////////////////////////////////////////////
if (event_active(BUTTON_15) && toggle0) { //CIRCLE
combo_run(CIRCLE); }
///////////////////////////////////////////////
if (event_active(BUTTON_7) && toggle0) { //L1
combo_run(L1); }
///////////////////////////////////////////////
if (event_active(BUTTON_4) && toggle0) { //R1
combo_run(R1); }
///////////////////////////////////////////////
}
combo SQUARE { //RT 100ms later SQUARE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_17, 0.00); //SQUARE
wait(100); //100ms later
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_17, 100.00); //SQUARE
wait(100);
}
combo TRIANGLE { //RT 100ms later TRIANGLE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_14, 0.00); //TRIANGLE
wait(100);
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_14, 100.00); //TRIANGLE
wait(100);
}
combo CIRCLE { //RT 100ms later CIRCLE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_15, 0.00); //CIRCLE
wait(100);
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_15, 100.00); //CIRCLE
wait(100);
}
combo L1 { //RT 100ms later L1
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_7, 0.00); //L1
wait(100);
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_7, 100.00); //L1
wait(100);
}
combo R1 { //RT 100ms later R1
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_4, 0.00); //R1
wait(100);
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_4, 100.00); //R1
wait(100);
}
- Haures
- Sergeant First Class
- Posts: 16
- Joined: Thu Sep 16, 2021 2:59 pm
- Location: Germany
Re: very easy script request
hey thnx alot man it works good but i misjudged the time between r2+button, 100ms is to fast. wich value must i change for the time to be 200 ms between r2+button?
-
waffle123 - Staff Sergeant
- Posts: 11
- Joined: Fri Oct 15, 2021 5:24 pm
Re: very easy script request
Here you go
- Code: Select all
#pragma METAINFO("Easy Script waffle123", 2, 0, "Haures")
/*
Script Version 2.0
Author: Haures
██ ██ ██████ ██ ██ ███████ ████████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
████████ ████████ ██ ██ ███████ ██████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ████ ██ ██ ████████ ████████
*/
//L3 and R3 should activate the Mod itself so when L3 and R3 got pressed it activates the Button Combos
///////////////////////////////
// Interactive Configuration //
///////////////////////////////
//change time here (the red number)
int time1 = 200; //time between RT pressed and the button getting pressed
//-----------------------------------------------------------------------------------------------------//
//Updated script
int toggle0=FALSE; //MASTER toggle
//NOTE: these combos wont loop so it only happens when you press/tap the Button
main {
if (get_val(BUTTON_9) && event_active(BUTTON_6)) { //9=L3 + 6=R3 turns the R2 + Button Combo on/off
toggle0 = !toggle0; }
///////////////////////////////////////////////
if (event_active(BUTTON_17) && toggle0) { //SQUARE
combo_run(SQUARE); }
///////////////////////////////////////////////
if (event_active(BUTTON_14) && toggle0) { //TRIANGLE
combo_run(TRIANGLE); }
///////////////////////////////////////////////
if (event_active(BUTTON_15) && toggle0) { //CIRCLE
combo_run(CIRCLE); }
///////////////////////////////////////////////
if (event_active(BUTTON_7) && toggle0) { //L1
combo_run(L1); }
///////////////////////////////////////////////
if (event_active(BUTTON_4) && toggle0) { //R1
combo_run(R1); }
///////////////////////////////////////////////
}
combo SQUARE { //RT 100ms later SQUARE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_17, 0.00); //SQUARE
wait(time1); //time when the Button gets pressed
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_17, 100.00); //SQUARE
wait(100);
}
combo TRIANGLE { //RT 100ms later TRIANGLE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_14, 0.00); //TRIANGLE
wait(time1); //time when the Button gets pressed
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_14, 100.00); //TRIANGLE
wait(100);
}
combo CIRCLE { //RT 100ms later CIRCLE
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_15, 0.00); //CIRCLE
wait(time1); //time when the Button gets pressed
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_15, 100.00); //CIRCLE
wait(100);
}
combo L1 { //RT 100ms later L1
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_7, 0.00); //L1
wait(time1); //time when the Button gets pressed
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_7, 100.00); //L1
wait(100);
}
combo R1 { //RT 100ms later R1
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_4, 0.00); //R1
wait(time1); //time when the Button gets pressed
set_val(BUTTON_5, 100.00); //R2
set_val(BUTTON_4, 100.00); //R1
wait(100);
}
- Haures
- Sergeant First Class
- Posts: 16
- Joined: Thu Sep 16, 2021 2:59 pm
- Location: Germany
Re: very easy script request
i found out why the 100ms did not work correct, because you have to keep the button pushed down to say to run the combo so of you only tabbed it it would not register both buttons (or register both at the same time and then only do one or the other)
is it possible to make it with the r2>100 ms button but then all it needs is just a tap instead of "holding" it down?
if not it still works wonderfull and i realy,realy appreciate the effort you took thank you very much!!
is it possible to make it with the r2>100 ms button but then all it needs is just a tap instead of "holding" it down?
if not it still works wonderfull and i realy,realy appreciate the effort you took thank you very much!!
-
waffle123 - Staff Sergeant
- Posts: 11
- Joined: Fri Oct 15, 2021 5:24 pm
Re: very easy script request
do you mean it just needs to tap r2?
(BUTTON_5, 100) <-- the 100 means it pressed/hold down
wait(100); <-- needs to be in between because you can have the same button pressed and released at the exact same time
(BUTTON_5, 0) <-- the 0 means it is NOT pressed/released
(BUTTON_5, 100) <-- the 100 means it pressed/hold down
wait(100); <-- needs to be in between because you can have the same button pressed and released at the exact same time
(BUTTON_5, 0) <-- the 0 means it is NOT pressed/released
- Haures
- Sergeant First Class
- Posts: 16
- Joined: Thu Sep 16, 2021 2:59 pm
- Location: Germany
Re: very easy script request
Haures wrote:do you mean it just needs to tap r2?
(BUTTON_5, 100) <-- the 100 means it pressed/hold down
wait(100); <-- needs to be in between because you can have the same button pressed and released at the exact same time
(BUTTON_5, 0) <-- the 0 means it is NOT pressed/released
yes it just needs to tap r2 then 100ms later tap the button
so idealy you would say for example just tap square and then the script does tap r2>100ms>tap square
-
waffle123 - Staff Sergeant
- Posts: 11
- Joined: Fri Oct 15, 2021 5:24 pm
Re: very easy script request
o and its for the titan two see its in the wrong forum, but what you made sofar did work so i dont think it's a issue
-
waffle123 - Staff Sergeant
- Posts: 11
- Joined: Fri Oct 15, 2021 5:24 pm
12 posts
• Page 1 of 2 • 1, 2
Return to GPC1 Script Programming
Who is online
Users browsing this forum: Majestic-12 [Bot] and 99 guests