[Question] Why?...

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

[Question] Why?...

Postby ShortEssay » Sun Jan 14, 2018 12:32 am

Can someone explain to me why you have to set the value to zero twice on a rapidfire script? For Example:

Code: Select all
combo RapidFire {
    set_val(FIRE_BUTTON, 100);
    wait(40);
    set_val(FIRE_BUTTON, 0);
    wait(30);
    set_val(FIRE_BUTTON, 0);
}

What is the Purpose/Benefit of doing this?
User avatar
ShortEssay
Sergeant First Class
Sergeant First Class
 
Posts: 20
Joined: Tue Apr 04, 2017 12:53 am

Re: [Question] Why?...

Postby Prototype » Sun Jan 14, 2018 4:15 pm

It is not mandatory but it is an optimization to be sure the combos stop/restart correctly.
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: [Question] Why?...

Postby J2Kbr » Mon Jan 15, 2018 4:08 pm

complementing prototype's reply. After the last wait statement there is a 10ms required to "finish" the combo. Adding the set_val() there ensures the button will have a know value for that period. this also explains why you have 40 and 30 in the waits, which results in an even 40/40 Rapidfire.
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 77 guests