NBA 2k21 Script help

GPC1 script programming for Titan One. Code examples, questions, requests.

NBA 2k21 Script help

Postby THEVET » Thu Sep 03, 2020 11:25 pm

Wondering if anyone can convert this, the GPC converting isnt working for me & its giving me all kinds of errors. \
\
Thanks in advance

Code: Select all
 
main {
 
     set_val(10, 0);
     set_val(20, 0);
 
     if(get_lval(10) > 20) { set_val(20, 100); }
     if(get_lval(20)) { set_val(10, 100); }
 
    }
User avatar
THEVET
Master Sergeant
Master Sergeant
 
Posts: 30
Joined: Thu Sep 12, 2019 3:19 pm

Re: NBA 2k21 Script help

Postby J2Kbr » Thu Sep 03, 2020 11:32 pm

For me didn't resulted any error. Anyway, here is reformatted for the Titan One:
Code: Select all
main {
    set_val(PS4_RY, 0);
    set_val(PS4_SQUARE, 0);
    if(get_lval(PS4_RY) > 20) {
        set_val(PS4_SQUARE, 100);
    }
    if(get_lval(PS4_SQUARE)) {
        set_val(PS4_RY, 100);
    }
}
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: NBA 2k21 Script help

Postby THEVET » Thu Sep 03, 2020 11:48 pm

J2Kbr wrote:For me didn't resulted any error. Anyway, here is reformatted for the Titan One:
Code: Select all
main {
    set_val(PS4_RY, 0);
    set_val(PS4_SQUARE, 0);
    if(get_lval(PS4_RY) > 20) {
        set_val(PS4_SQUARE, 100);
    }
    if(get_lval(PS4_SQUARE)) {
        set_val(PS4_RY, 100);
    }
}



You are a godsend @j2kbr :smile0202: thanks brodie, also its titan two im working with & im still getting 17 errors when trying to write it
User avatar
THEVET
Master Sergeant
Master Sergeant
 
Posts: 30
Joined: Thu Sep 12, 2019 3:19 pm

Re: NBA 2k21 Script help

Postby J2Kbr » Fri Sep 04, 2020 12:05 am

THEVET wrote:You are a godsend @j2kbr :smile0202: thanks brodie, also its titan two im working with & im still getting 17 errors when trying to write it

Understood, for the Titan Two just add #include <titanone.gph> at the beginning of the code.
Code: Select all
#include <titanone.gph>
 
main {
    set_val(PS4_RY, 0);
    set_val(PS4_SQUARE, 0);
    if(get_lval(PS4_RY) > 20) {
        set_val(PS4_SQUARE, 100);
    }
    if(get_lval(PS4_SQUARE)) {
        set_val(PS4_RY, 100);
    }
}
 
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: NBA 2k21 Script help

Postby THEVET » Sat Sep 05, 2020 10:02 pm

Need a Quick update if possible, Could you change the square again to right analog Vertically UP and immediately down, with down being time released?

Thanks in Advance


Code: Select all
#include <titanone.gph>
 
main {
    set_val(PS4_RY, 0);
    set_val(PS4_SQUARE, 0);
    if(get_lval(PS4_RY) > 20) {
        set_val(PS4_SQUARE, 100);
    }
    if(get_lval(PS4_SQUARE)) {
        set_val(PS4_RY, 100);
    }
}
 
User avatar
THEVET
Master Sergeant
Master Sergeant
 
Posts: 30
Joined: Thu Sep 12, 2019 3:19 pm

Re: NBA 2k21 Script help

Postby J2Kbr » Mon Sep 07, 2020 11:27 am

Please check if the changes made below are what you want. :smile0517:
Code: Select all
#include <ps4.gph>
 
main {
    set_val(PS4_RY, 0.0);
    set_val(PS4_SQUARE, 0.0);
    if(get_actual(PS4_RY) > 20.0) {
        set_val(PS4_SQUARE, 100.0);
    }
    if(get_actual(PS4_SQUARE)) {
        if(event_active(PS4_SQUARE)) {
            combo_run(RightStickUP);
        }
        set_val(PS4_RY, 100.0);
    } else {
        combo_stop(RightStickUP);
    }
}
 
combo RightStickUP {
    set_val(PS4_RY, -100.0);
    wait(80);
}
 
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: NBA 2k21 Script help

Postby Boris » Wed Sep 09, 2020 2:37 am

Hi, can someone tell me how to use this script with titan2? Thanks
User avatar
Boris
Sergeant
Sergeant
 
Posts: 8
Joined: Thu Aug 13, 2020 7:28 am

Re: NBA 2k21 Script help

Postby Boris » Wed Sep 09, 2020 2:55 am

THEVET wrote:Wondering if anyone can convert this, the GPC converting isnt working for me & its giving me all kinds of errors. \
\
Thanks in advance

Code: Select all
 
main {
 
     set_val(10, 0);
     set_val(20, 0);
 
     if(get_lval(10) > 20) { set_val(20, 100); }
     if(get_lval(20)) { set_val(10, 100); }
 
    }




This script is for the green shot?
User avatar
Boris
Sergeant
Sergeant
 
Posts: 8
Joined: Thu Aug 13, 2020 7:28 am

Re: NBA 2k21 Script help

Postby J2Kbr » Wed Sep 09, 2020 10:21 am

Boris wrote:Hi, can someone tell me how to use this script with titan2? Thanks

To use the script, first open Gtuner IV, then click on menu File -> New -> empty GPC File.

Give a name for the GPC file and click “Create”.

Copy and paste the script code into this new file, Save the file.

To load the script into a memory slot click on File -> Install To -> <memory slot number>
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: NBA 2k21 Script help

Postby Boris » Wed Sep 09, 2020 1:29 pm

J2Kbr wrote:
Boris wrote:Hi, can someone tell me how to use this script with titan2? Thanks

To use the script, first open Gtuner IV, then click on menu File -> New -> empty GPC File.

Give a name for the GPC file and click “Create”.

Copy and paste the script code into this new file, Save the file.

To load the script into a memory slot click on File -> Install To -> <memory slot number>



It seems doesn't work. Probably i don't understand the meaning of the script. Which button i should Press on joypad?
Is this script for green shot?
User avatar
Boris
Sergeant
Sergeant
 
Posts: 8
Joined: Thu Aug 13, 2020 7:28 am

Next

Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 131 guests