Trying to get left stick to move left and then right
2 posts
• Page 1 of 1
Trying to get left stick to move left and then right
I was hoping someone could help please, all im trying to get is my left analog stick move left and then right when i press A and not stop until i press A again, but at the moment it's moving right and then forwards and activates as soon as i load the profile on the titan stick.. Any help would be appreciated
This is what ive got so far
This is what ive got so far
- Code: Select all
//
// Anti afk script
//----------------------------------------
main {
if(get_ptime(XB1_A)) {
combo_run(AntiAFK);
}
}
combo AntiAFK {
set_val(XB1_LY, 100);
wait(100);
set_val(XB1_LY, 0);
wait(4000);
set_val(XB1_LY, 0);
wait (1000);
set_val(XB1_LY, -100);
wait(100);
set_val(XB1_LY, -0);
wait(4000);
set_val(XB1_LY, -0);
wait (1000);
}
- Rejectz
- Sergeant First Class
- Posts: 23
- Joined: Fri Feb 20, 2015 10:17 am
Re: Trying to get left stick to move left and then right
Try this:
- Code: Select all
//
// Anti afk script
//----------------------------------------
int toggleAntiAFK = 0; //this flag will manage the AFK combo execution
main {
if(event_press(XB1_A)) {
toogleAntiAFK = !toogleAntiAFK; // this ON/OFF the flag
}
if(toogleAntiAFK){ // when flag is ON/TRUE run the combo
combo_run(AntiAFK);
}
else
if(combo_running(AntiAFK)){ //if flag is FALSE/OFF and the combo is running, stop it
combo_stop(AntiAFK);
}
}
combo AntiAFK {
set_val(XB1_LY, 100);
wait(100);
set_val(XB1_LY, 0);
wait(4000);
set_val(XB1_LY, 0);
wait (1000);
set_val(XB1_LY, -100);
wait(100);
set_val(XB1_LY, -0);
wait(4000);
set_val(XB1_LY, -0);
wait (1000);
}
-
alanmcgregor - Major
- Posts: 995
- Joined: Tue Mar 27, 2018 8:38 am
2 posts
• Page 1 of 1
Return to GPC1 Script Programming
Who is online
Users browsing this forum: No registered users and 78 guests