Grenade cook request

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

Grenade cook request

Postby Beryl » Tue Feb 21, 2023 3:40 pm

Has anyone got an auto cook grenade script so the process im looking for is
when i hold button 5 after 3 seconds my cook grenade button which is currently button 12 gets pushed 1 time whilst still holding down button 5 so nades cooked and awaiting me let go of button 5.
User avatar
Beryl
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 198
Joined: Fri Nov 27, 2020 7:47 pm

Re: Grenade cook request

Postby Scachi » Tue Feb 21, 2023 6:04 pm

Code: Select all
 
main {
    if (elapsed_time() && get_actual(BUTTON_5) && time_active(BUTTON_5) == 3000) {
        combo_run(cBtnCook);
    }
}
 
combo cBtnCook {
    set_val(BUTTON_12, 100);
    wait(30);
}
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Grenade cook request

Postby Beryl » Tue Feb 21, 2023 6:55 pm

Thank you!
User avatar
Beryl
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 198
Joined: Fri Nov 27, 2020 7:47 pm

Re: Grenade cook request

Postby Beryl » Wed Feb 22, 2023 9:02 pm

This is exactly what iv been after works real good, thanks again
User avatar
Beryl
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 198
Joined: Fri Nov 27, 2020 7:47 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: kubawaz and 119 guests