Page 1 of 1

Move left analog stick right

PostPosted: Mon Mar 11, 2019 5:50 pm
by Demonbane
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.

Re: Move left analog stick right

PostPosted: Thu Mar 14, 2019 7:12 am
by J2Kbr
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);
    }
}