is_release is not working!

Gtuner IV general support. Operation, questions, updates, feature request.

is_release is not working!

Postby bonefisher » Sun Oct 18, 2020 12:35 am

Code: Select all
 
main {
    if(get_actual(BUTTON_8) && time_active(BUTTON_8) > 320){
        if(is_release(STICK_1_X) || is_release(STICK_1_Y)){
          set_val(BUTTON_9, 100.0);
        }
    }
}
 

is_release isn't working correctly when dragging up or down right or left but does work on angles!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5381
Joined: Thu Jan 29, 2015 10:49 am

Re: is_release is not working!

Postby J2Kbr » Mon Oct 19, 2020 7:37 pm

For what you are trying to achieve the conditional operation should be AND (not OR), example:
Code: Select all
main {
    if(get_actual(BUTTON_8) && time_active(BUTTON_8) > 320){
        if(is_release(STICK_1_X) && is_release(STICK_1_Y)){
          set_val(BUTTON_9, 100.0);
        }
    }
}
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 19452
Joined: Tue Mar 18, 2014 1:39 pm

Re: is_release is not working!

Postby bonefisher » Mon Oct 19, 2020 11:59 pm

:smile0517: working like it should....Thanks! I thought you could do either or and it should of worked. Guess not!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5381
Joined: Thu Jan 29, 2015 10:49 am

Re: is_release is not working!

Postby DontAtMe » Tue Oct 20, 2020 5:22 am

bonefisher wrote::smile0517: working like it should....Thanks! I thought you could do either or and it should of worked. Guess not!

Alternatively.
Code: Select all
if(!(is_active(STICK_1_X) || is_active(STICK_1_Y))){
User avatar
DontAtMe
Captain
Captain
 
Posts: 480
Joined: Tue Oct 02, 2018 4:49 am


Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 10 guests

cron