i cant seem to add this to the current combo HELP

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

i cant seem to add this to the current combo HELP

Postby CzechSniper » Thu Sep 17, 2020 1:01 am

Im tryin to set the value of Stick_2_Y to 0 in this combo i currently have and it doesnt seem to be working. Im trying to make it to where the value of stick_2_y would be set to 0 until button 5 has been released. if someone could help it would be greatly appreciated
Code: Select all
#pragma METAINFO("SnipersRemorse", 1, 0, "bonefisher")
 
bool trigger_toggle;
 
main {
 
    if(event_active(BUTTON_9) || get_actual(BUTTON_4) || event_active(BUTTON_5)){
      inhibit(BUTTON_4, 140);
      trigger_toggle = FALSE;
    }
    if(event_active(BUTTON_8)){
      trigger_toggle = TRUE;
    }else if(get_actual(BUTTON_8) && time_active(BUTTON_8) > 140) {
      set_val(BUTTON_9, 100);
    }else if(trigger_toggle == TRUE && event_release(BUTTON_8)) {
      combo_run(QuickScope);
    }
    if(event_active(BUTTON_9)){combo_run(ScopeZoom);}
}
combo QuickScope
{
    set_val(BUTTON_8, 100);
    set_val(BUTTON_9, 100);
    set_val(BUTTON_5, 100);
    wait(50);
}
combo ScopeZoom
{
    set_val(BUTTON_9, 0.0);
    wait(80);
    set_val(BUTTON_9, 100.0);
    wait(100);
    set_val(BUTTON_9, 0.0);
    wait(80);
}
User avatar
CzechSniper
Staff Sergeant
Staff Sergeant
 
Posts: 11
Joined: Wed Jun 24, 2020 5:17 am

Re: i cant seem to add this to the current combo HELP

Postby DontAtMe » Thu Sep 17, 2020 3:28 am

Code: Select all
if (QuickScope) set_val(STICK_2_Y, 0);
User avatar
DontAtMe
Captain
Captain
 
Posts: 502
Joined: Tue Oct 02, 2018 4:49 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 84 guests