PS1 to PS4, dpad inputting as stick...

GPC2 script programming for Titan Two. Code examples, questions, requests.

PS1 to PS4, dpad inputting as stick...

Postby boyaloxer » Thu Aug 22, 2019 11:36 pm

I'm trying to use a ps1 controller on ps4 for fighting games.

Problem I'm having is it's reading the ps1 dpad as though it was a stick.

I'm not familiar enough with scripting to confidently fix this, especially since it is probably going to require some /readval lx if > 0 then /setval etc.

If anyone has had this problem or knows of a script that would fix it I would really appreciate it.
User avatar
boyaloxer
Sergeant
Sergeant
 
Posts: 8
Joined: Thu Aug 22, 2019 11:27 pm

Re: PS1 to PS4, dpad inputting as stick...

Postby Prototype » Sat Aug 24, 2019 8:50 am

You can try something like that:
Code: Select all
main {
    set_val(BUTTON_10, 0.0);
    set_val(BUTTON_11, 0.0);
    set_val(BUTTON_12, 0.0);
    set_val(BUTTON_13, 0.0);
 
    set_val(STICK_2_X, 0.0);
    set_val(STICK_2_Y, 0.0);
 
 
    if(get_actual(BUTTON_10)) set_val(STICK_2_Y, -100.0);
    if(get_actual(BUTTON_11)) set_val(STICK_2_Y, 100.0);
    if(get_actual(BUTTON_12)) set_val(STICK_2_X, -100.0);
    if(get_actual(BUTTON_13)) set_val(STICK_2_X, 100.0);
 
 
    if(get_actual(STICK_2_Y) < -20.0) set_val(BUTTON_10, 100.0);
    if(get_actual(STICK_2_Y) > 20.0) set_val(BUTTON_11, 100.0);
    if(get_actual(STICK_2_X) < -20.0) set_val(BUTTON_12, 100.0);
    if(get_actual(STICK_2_X) > 20.0) set_val(BUTTON_13, 100.0);
}
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3251
Joined: Sun Dec 16, 2012 1:43 pm

Re: PS1 to PS4, dpad inputting as stick...

Postby boyaloxer » Sun Aug 25, 2019 6:05 am

That worked!

Thanks so much, I've probably spent about 10 hours trying to figure something out over the last few days.

Surprisingly I didn't find any other posts with solutions to this online and only a few with the same problem.

You're a life saver!
User avatar
boyaloxer
Sergeant
Sergeant
 
Posts: 8
Joined: Thu Aug 22, 2019 11:27 pm

Re: PS1 to PS4, dpad inputting as stick...

Postby Prototype » Sun Aug 25, 2019 7:51 am

Cool, it's a simple script but it can be a hard to find :smile0517:
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic! :smile0517:
User avatar
Prototype
Major General
Major General
 
Posts: 3251
Joined: Sun Dec 16, 2012 1:43 pm

Re: PS1 to PS4, dpad inputting as stick...

Postby J2Kbr » Mon Aug 26, 2019 6:19 pm

prototype wrote:Cool, it's a simple script but it can be a hard to find :smile0517:

:joia: :joia: +1 agree.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 96 guests