if you query the button's values, it appears to only return a single int, and that int is the added results of all the pressed buttons.
for example:
none pressed = 0
button1 = 1
button2 = 2
button3 = 4
button4 = 8
button1 + button4 = 9
button2 + button3 + button4 = 14
i can't imagine putting in a gazillion if statements for all the possible numbers that could indicate if button2 was currently pressed, so i wonder if i'm missing something about this.
the query is this:
ch("../null1/Masks")
i've tried other ways of querying the value in an array or dict manner but all failed...
but no way can a multiple choice button be this difficult to use....!?
thanks in advance!
-seneca
BUTTON STRIP : how to query their values in hscript?
1237 3 1- indigosm
- Member
- 47 posts
- Joined: April 2020
- Offline
- tamte
- Member
- 8551 posts
- Joined: July 2007
- Online
multichoice buttonstrips or iconstrips are represented as bitfield
use bittest() to check which bit is on
it will return 1 if the bit in question is on and 0 if off (meaning if the button is on or off)
to check if first button (0) is on do:second button (1): third button (2): fourth button (3): fifth button (4): ...
use bittest() to check which bit is on
it will return 1 if the bit in question is on and 0 if off (meaning if the button is on or off)
to check if first button (0) is on do:
bittest(ch("../null1/Masks"), 0)
bittest(ch("../null1/Masks"), 1)
bittest(ch("../null1/Masks"), 2)
bittest(ch("../null1/Masks"), 3)
bittest(ch("../null1/Masks"), 4)
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- indigosm
- Member
- 47 posts
- Joined: April 2020
- Offline
- indigosm
- Member
- 47 posts
- Joined: April 2020
- Offline
-
- Quick Links