Move left analog stick right

GPC script programming for Titan One device. Code examples, how to, questions, requests.

Moderators: The_Rabid_Taco, pablosscripts, bonefisher, Baby Cham, Elvish

Move left analog stick right

Postby Demonbane » Mon Mar 11, 2019 5:50 pm

Hello,

I am looking to automate movement in a game on ps4 and was wondering if anyone could make me a piece of code to move the left analog stick right with speed and time held within the code, thanks.
User avatar
Demonbane
Corporal
Corporal
 
Posts: 5
Joined: Wed Sep 05, 2018 2:36 am

Re: Move left analog stick right

Postby J2Kbr » Thu Mar 14, 2019 7:12 am

Please check if this is what you want.
Code: Select all
define SPEED = 1;
 
int toggle;
int value;
 
main {
    if(event_press(PS4_CROSS)) {
        if(!toggle) {
            toggle = TRUE;
            value = 0;
        }
    }
    if(toggle) {
        value = value + SPEED;
        if(value > 100) {
            value = 100;
            toggle = FALSE;
        }
        set_val(PS4_RX, value);
    }
}
 
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 16860
Joined: Tue Mar 18, 2014 1:39 pm


Return to GPC Script Programming (Titan One)

Who is online

Users browsing this forum: SirrapT and 11 guests