I have a question, please
2 posts
• Page 1 of 1
I have a question, please
I can't work out why this code isn't working. I want the combo to run when I hold PS3_TRIANGLE for more than half a second and then stop when I press it again. I'm using a PS3 controller on a PS4 just to be clear.
Here's the relevant code:
Here's the relevant code:
- Code: Select all
remap PS3_TRIANGLE -> PS4_CIRCLE;
remap PS3_CIRCLE -> PS4_TRIANGLE;
main {
if(get_val(PS3_TRIANGLE) && get_ptime(PS3_TRIANGLE) > 500) {
combo_run(StealthMode);
}
if(combo_running(StealthMode) && get_val(PS3_TRIANGLE)) {
combo_stop(StealthMode);
}
}
combo StealthMode {
set_val(PS4_R2, 100);
wait(4000);
set_val(PS4_R2, 100);
wait(4000);
set_val(PS4_R2, 100);
wait(4000);
set_val(PS4_R2, 100);
wait(4000);
}
- Code: Select all
remap PS3_TRIANGLE -> PS4_CIRCLE;
remap PS3_CIRCLE -> PS4_TRIANGLE;
int Combo_on = FALSE;
main {
if(get_val(PS3_TRIANGLE) && get_ptime(PS3_TRIANGLE) > 500) {
Combo_on = TRUE;
}
if(Combo_on) {
combo_run(StealthMode);
if(event_press(PS3_TRIANGLE)) {
Combo_on = FALSE;
}
-
themoon - Private First Class
- Posts: 2
- Joined: Thu Jan 17, 2019 1:45 am
Re: I have a question, please
This code is for the Titan One:
Try this for running the combo once and stop with press of triangle:
or this for endless repeat until pressed again:
Try this for running the combo once and stop with press of triangle:
- Code: Select all
remap PS3_TRIANGLE -> PS3_CIRCLE;
remap PS3_CIRCLE -> PS3_TRIANGLE;
main {
if(get_val(PS3_TRIANGLE) && get_ptime(PS3_TRIANGLE) > 500) {
combo_run(StealthMode);
}
else if(combo_running(StealthMode) && event_press(PS3_TRIANGLE)) {
combo_stop(StealthMode);
}
}
combo StealthMode {
set_val(PS4_R2, 100);
wait(4000);
set_val(PS4_R2, 100);
wait(4000);
set_val(PS4_R2, 100);
wait(4000);
set_val(PS4_R2, 100);
wait(4000);
}
or this for endless repeat until pressed again:
- Code: Select all
remap PS3_TRIANGLE -> PS4_CIRCLE;
remap PS3_CIRCLE -> PS4_TRIANGLE;
int Combo_on = FALSE;
main {
if(get_val(PS3_TRIANGLE) && get_ptime(PS3_TRIANGLE) > 500) {
Combo_on = TRUE;
}
if(Combo_on) {
combo_run(StealthMode);
if(event_press(PS3_TRIANGLE)) {
Combo_on = FALSE;
combo_stop(StealthMode);
}
}
}
combo StealthMode {
set_val(PS4_R2, 100);
wait(4000);
set_val(PS4_R2, 100);
wait(4000);
set_val(PS4_R2, 100);
wait(4000);
set_val(PS4_R2, 100);
wait(4000);
}
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
2 posts
• Page 1 of 1
Return to GPC1 Script Programming
Who is online
Users browsing this forum: No registered users and 55 guests