|
Erwin Goldblatt
Registered User
Join date: 23 Dec 2006
Posts: 41
|
01-24-2007 09:13
Ok - I admit to being thick (thats out of the way then).
In the library module on the wikki - which I have implemented into a small script I am playing with - I see a bitmask (answermask) option.
I have done a quick hunt around and cant find documentation on this (?)feature - now am I being slap me stupid or is the example not using the written down values in the table on the wikki for button responses...
For the life of me I cant see what the mask does and I'd ask if anyone can throw some light on what that little mask bit actually achieves for me? And how its actually worked out?
My thanks in advance.
Erwin
|
|
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
|
01-24-2007 09:17
erwin can you be more clear? I have no idea what you're talking about.
If you are having problem with code from the library, please include a link to the code.
If you're having problems with code you've written, post it here.
|
|
Erwin Goldblatt
Registered User
Join date: 23 Dec 2006
Posts: 41
|
01-24-2007 11:21
My apologies for running off with the typing... I refer to: http://cheesefactory.us/lslwm/LibraryDialogModule.htmWith specific reference to: "The forth element is an integer it is used as a mask for when a button is pressed if it will trigger a response." In paragraph 3 entitled "The Request". I specifically am trying to figure out what the "mask" is and how it works - as the examples shown in the wikki (below): Line 38 of the example access script: "integer AnswerMask = 0x005;" and Line 44 of the example access script: "dialog(llDetectedKey(0), "Hello\nDo you like me?", 30, ["Yes", "No"], 0xf0fff...." are both different, causing me to loop the loop in brain cycles and crash out! My code actually works, thats not the issue - I just cant logically relate the "mask" to anything meaningful. Apologies if this is too simple, i can figure most things but have brain lockout on this. Erwin
|
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
01-24-2007 14:14
The defintion of the bits for the buttonmask are listed under MISC: on the page you linked.
|
|
Erwin Goldblatt
Registered User
Join date: 23 Dec 2006
Posts: 41
|
01-24-2007 14:58
Hi & Thanks for the reply. From: Darien Caldwell The defintion of the bits for the buttonmask are listed under MISC: on the page you linked. Ok I get that its a bunch of 0's and 1's which in order make allow us to retrive which button was pressed.. (I think). What I dont get and this is a failing of my understanding I think, is how the hex equivalent is used in that string (as I have looked at the defintion of the mask, then bitfield then hexadecimal.......) and I cant figure why theres an "x" in there!! Perhaps this is just me but for the life of me I cant see how the button conversion as shown in the samples can convert to the hex values in the example. I really would appreciate if someone could explain this simple thing - as surely I can't be the only person in the world who understands what the rest of the script does and can't see what that bit does? Or perhaps I am... Erwin
|
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
01-24-2007 16:19
The x is there to denote the numbers are in Hexidecimal notation.
By combining the different bits, you can control how the dialog behaves, the first 12 bits correspond to the 12 possible buttons you can have on a dialog box. So say you have all 12 buttons showing, but only want to allow your script to respond to button 2, you would set the mask to 4 (0x4 Hex). the 0x5 you mentioned previously is a combination of the masks for buttons 0 and 2 (0x1 and 0x4). The other bits are fore specialized conditions.
This system you are trying to use is very powerful, but very complicated. If you are trying to create simple dialogs, it may be easier to make llDialog() calls directly, rather than using this system.
|
|
Erwin Goldblatt
Registered User
Join date: 23 Dec 2006
Posts: 41
|
01-24-2007 16:25
From: Darien Caldwell The x is there to denote the numbers are in Hexidecimal notation. <snip></snip> This system you are trying to use is very powerful, but very complicated. If you are trying to create simple dialogs, it may be easier to make llDialog() calls directly, rather than using this system.
Hey thanks Darien I get that now, and you are correct... it is like sledgehammer to walnut for simple 3 choice dialogs. My thanks to you for your extended patience. Erwin
|