D1 GP help needed - Scope Shot with rapid-fire enabled

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

D1 GP help needed - Scope Shot with rapid-fire enabled

Postby Midnight » Fri Oct 18, 2019 11:47 am

Hello,

I still use Destiny 1 Gamepack with T1 – I like it – but for a long time I faced with some problem.
It became impossible to solve it in code of GP by myself, so I decide to ask for help here.

In a D1 Gamepack there is setting #7 in section 06: SHOT MODES named - “Scope Shot: Scope Disable”.
Supposedly, enabling it should mean “Auto ADS” – as automatically aim down sights while firing.
But, if together with this setting I enable rapid-fire – then ADS is not just staying on, but twitching/jiggling, as like if ADS on/off rapidly fast.
I guess it’s because rapid-fire itself mean rapidly pressing fire button.

In this case I would like to ask for help from all T1 code gurus here :)
Is it possible to adjust somehow the code of this setting to make Scope Shot correctly work together with rapid-fire from the same GP?

If it will be helpful I have the whole code of D1 GP, but I guess the parts of code which connected to the issue and to adjust is following:
Code: Select all
        // SHOT MODES
        if(i006_option && get_val(fire_button)) {
            if(i006_option % 2) {
                if(!get_val(scope_button)) ShotModes();
                else combo_stop(ShotMode);
            } else if(get_val(fire_button) == 100) ShotModes()
 
combo ShotMode {
    set_val(sMode_button, 100);
    wait(sMode_press);
    if(sMode_release) set_val(sMode_button, -100);
    wait(sMode_release);
 
function ShotModes() {
    if(i006_option == 7) {
        sMode_button = scope_button;
        sMode_press = 100; sMode_release = 0;
        combo_run(ShotMode);

Any help will be appreciate greatly!
Midnight
Sergeant First Class
Sergeant First Class
 
Posts: 23
Joined: Thu Apr 13, 2017 10:15 pm

Re: D1 GP help needed - Scope Shot with rapid-fire enabled

Postby J2Kbr » Sat Oct 19, 2019 1:28 pm

Replace the combo ShotMode to the following:

Code: Select all
combo ShotMode {
    set_val(sMode_button, 100);
}


This should solve the issue.
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: D1 GP help needed - Scope Shot with rapid-fire enabled

Postby Midnight » Mon Oct 21, 2019 1:15 pm

Hi,

At first, thanks a lot for trying to help!
It is very appreciated.

Just to be clear and to be sure that I understand you correctly, you’ve suggested to change (reduce) whole this ShotMode combo part (6 lines) to just 2?

Before it was:
Code: Select all
combo ShotMode {
    set_val(sMode_button, 100);
    wait(sMode_press);
    if(sMode_release) set_val(sMode_button, -100);
    wait(sMode_release);
}

After change it should be:
Code: Select all
combo ShotMode {
    set_val(sMode_button, 100);
}

So I just have to delete:
Code: Select all
wait(sMode_press);
if(sMode_release) set_val(sMode_button, -100);
wait(sMode_release);

parts?

Is it right?
I even guessed maybe some part of code that you suggested to insert are missing…

I tried it like you wrote, but looks like it’s breaking the script entirely.
Even rapid-fire stopped working after that.

To make things easier – I PM you the whole GP code – could you please make the correction and send it back to me (if it’s OK for you)?
Midnight
Sergeant First Class
Sergeant First Class
 
Posts: 23
Joined: Thu Apr 13, 2017 10:15 pm

Re: D1 GP help needed - Scope Shot with rapid-fire enabled

Postby J2Kbr » Tue Oct 22, 2019 8:52 am

You are right, please try replace the same combo with this code to check if works (I cannot test at the moment).

Thanks.

Code: Select all
combo ShotMode {
    set_val(sMode_button, 100);
    wait(sMode_press);
    if(sMode_release) set_val(sMode_button, -100);
    else if(i006_option == 7) set_val(sMode_button, 100);
    wait(sMode_release);
    if(i006_option == 7) set_val(sMode_button, 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: D1 GP help needed - Scope Shot with rapid-fire enabled

Postby Midnight » Wed Oct 23, 2019 1:12 pm

J2Kbr wrote:You are right, please try replace the same combo with this code to check if works (I cannot test at the moment).

Thanks.


1) I replaced the combo with your new code, tested it and now Scope Shot (Shot mode #7 in D1 GP) is working perfectly! :smile0517:
Thank you!!
As I guess the same code is used in D1 GP (ps4) – could you please replace it there also?
I think it will be helpful for all users of this GP.

2) Hope I will not seem too annoying if I ask you to look on my another topic in near section: viewtopic.php?f=5&t=13806&wpureload=1
I see that D1 GP have a bug in Crouch Shot mode with Press Sensitivity (mode #2) – it looks like crouch action executing quickly two times instead of one and so it’s causing inconvenient in-game result.
It will be just great if this bug in D1 GP was fixed as well – I some kind of addicted to it because it’s still good :D

Meanwhile, wating for your return from your trip :) - I tried to analyze the D1 GP (ps4) code to probably find a reason for this bug.

I guess the problem is hidden in these parts:

Initial section:

Code: Select all
// SHOT MODES
        if(i006_option && get_val(fire_button)) {
            if(i006_option % 2) {
                if(!get_val(scope_button)) ShotModes();
                else combo_stop(ShotMode);
            } else if(get_val(fire_button) == 100) ShotModes();
        }

Combo section (which now after correction) looks like this:

Code: Select all
combo ShotMode {
    set_val(sMode_button, 100);
    wait(sMode_press);
    if(sMode_release) set_val(sMode_button, -100);
    else if(i006_option == 7) set_val(sMode_button, 100);
    wait(sMode_release);
    if(i006_option == 7) set_val(sMode_button, 100);
}
 

And function section:

Code: Select all
function ShotModes() {
    if(i006_option == 7) {
        sMode_button = scope_button;
        sMode_press = 100; sMode_release = 0;
        combo_run(ShotMode);
    } else if(i006_option >= 5) {
        if(!combo_running(ShotMode)) {
            sMode_button = GAME_X_MOV;
            sMode_press = 300; sMode_release = 300;
            combo_restart(ShotMode)
        }
    } else if(event_press(fire_button) || (get_val(fire_button) == 100 && get_lval(fire_button) != 100)) {
         if(i006_option >= 3) {
            sMode_button = jump_button; sMode_press = 200;
        } else {
            sMode_button = crouch_button; sMode_press = 1000;
        }
        sMode_release = 0;
        combo_run(ShotMode);
    }
}

Maybe it will be more convenient and less time consuming for you to just point out for me the exact part which is controlling "Shot mode 02: Crouch Shot: Press Sensitivity" and then I could figure out the bug by myself?

Anyway, just chillin and waiting for the answer. :oops:
Midnight
Sergeant First Class
Sergeant First Class
 
Posts: 23
Joined: Thu Apr 13, 2017 10:15 pm

Re: D1 GP help needed - Scope Shot with rapid-fire enabled

Postby J2Kbr » Wed Oct 23, 2019 4:28 pm

You are welcome, the part you should focus is this:

Code: Select all
    } else if(event_press(fire_button) || (get_val(fire_button) == 100 && get_lval(fire_button) != 100)) {
         if(i006_option >= 3) {
            sMode_button = jump_button; sMode_press = 200;
        } else {
            sMode_button = crouch_button; sMode_press = 1000;
        }
        sMode_release = 0;
        combo_run(ShotMode);
    }


This line is for crouch shot:
Code: Select all
            sMode_button = crouch_button; sMode_press = 1000;


And the press sensitivity check happens on this conditional:
Code: Select all
    } else if(event_press(fire_button) || (get_val(fire_button) == 100 && get_lval(fire_button) != 100)) {


more specifically here:
Code: Select all
(get_val(fire_button) == 100 && get_lval(fire_button) != 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: D1 GP help needed - Scope Shot with rapid-fire enabled

Postby Midnight » Mon Oct 28, 2019 8:01 am

Hi,
yes, I changed sMode_press param to "200" in this part and problem is gone :smile0203:

Code: Select all
sMode_button = crouch_button; sMode_press = 200;

Thanks a lot for your help!
Midnight
Sergeant First Class
Sergeant First Class
 
Posts: 23
Joined: Thu Apr 13, 2017 10:15 pm

Re: D1 GP help needed - Scope Shot with rapid-fire enabled

Postby J2Kbr » Mon Oct 28, 2019 10:44 am

You are welcome. :)
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 GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 66 guests