@TempodiBasic STRIG((i - 1) * 4) and STRIG((i * 4 +1) aren’t the same.
STRIG has 2 things it can report to us for each button:
0 — has it changed?
1 — is it down?
My little code is testing to see if the button is down, yours is testing to see if it’s changed states.
Starting out, they seem the same, but they’re not.
Button starts UP, both report 0.
Press the button down, both report -1 (true). (State has changed, and it’s down.)
Hold it down, and STRIG(0) reports 0, STRIG(1) reports -1. (State hasn’t changed, but the button is down.)
Release the button, STRIG(0) reports -1, STRIG(1) reports 0. (State changed, and the button is up.)
Leave it up and both report 0, and we’re back to start.
In my little menu program, I actually check both:
IF STRIG(0) AND STRIG(1) THEN...
This means the button had to have been up, and then was pressed down as a selection tool. There’s no chance a stuck button would just blow past the input like that. ;)
My sky is blue; yours is blue, tinged with a hint of a red sunrise. Similar, but not
exactly the same.
I’m reading from STRIG 1, 5, 9, 13, 17...
You’re reading from STRIG 0, 4, 8, 12, 16...
(And if you’re curious, the buttons between are for a second controller.)
2/3 are state change/up and down for button 1 of controller 2.
6/7 are for button 2 of controller 2...
This all goes back to the legacy days of QB45 where we only had 1-axis and 1-button on each controller to support. ;)