Request:Remap sticks when pressed R2 and L2 together
2 posts
• Page 1 of 1
Request:Remap sticks when pressed R2 and L2 together
please help with scrip on T2.
I have PS4 and want to remap/swap ps dualshock4 controllers' rigt stick with left stik only when L2 and R2 buttons are pushed and being hold pressed togehter. When one of L2 or R2 button is released, the right stick and left stick changes back ( means rigts stick is right, left is left again)
I am new at scripting. please help. Thank you.
I have PS4 and want to remap/swap ps dualshock4 controllers' rigt stick with left stik only when L2 and R2 buttons are pushed and being hold pressed togehter. When one of L2 or R2 button is released, the right stick and left stick changes back ( means rigts stick is right, left is left again)
I am new at scripting. please help. Thank you.
-
unisistar - Private
- Posts: 1
- Joined: Sun Sep 29, 2019 6:33 pm
Re: Request:Remap sticks when pressed R2 and L2 together
- Code: Select all
#include <ps4.gph>
main {
if(is_active(PS4_R2) && is_active(PS4_L2)){
swap_inputs(PS4_RX, PS4_LX);
swap_inputs(PS4_RY, PS4_LY);
}
}
void swap_inputs(uint8 input_one, uint8 input_two){
fix32 temp = get_val(input_one);
set_val(input_one, get_val(input_two));
set_val(input_two, temp);
}
-
DontAtMe - Captain
- Posts: 502
- Joined: Tue Oct 02, 2018 4:49 am
2 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 100 guests