Page 1 of 1

Stop a script running on any button pressed?

PostPosted: Thu Sep 09, 2021 11:42 pm
by kenshyn
Any easy way that this can be done????

Re: Stop a script running on any button pressed?

PostPosted: Fri Sep 10, 2021 7:55 am
by Mad
You can run a loop to check if a button is pressed:
Code: Select all
main {
    uint8 i = 0;
    do {
        if(is_active(i)) {
            // stop script stuff here
        }
    } while (++i < 20);
}

Re: Stop a script running on any button pressed?

PostPosted: Wed Sep 15, 2021 2:18 pm
by kenshyn
Thank you!!!!!