|
Chris Wilde
Custom User Title
Join date: 21 Jul 2004
Posts: 768
|
04-13-2005 17:14
Im trying to set a value of a variable based on whether or not someone is in the same group as the object the script is contained in. Im new to LSL so bare with me. I assume llSameGroup is the best route? Basically want to say If same group, set value to A, if false set value to B. I think my problem is how do I get the "ID" of the person running/clicking the script/object that the function needs.
Thanks in advance.
|
|
Olmy Seraph
Valued Member
Join date: 1 Nov 2004
Posts: 502
|
04-13-2005 22:07
warning, i'm doing this from memory, not compiled so there could be an error... touch_start(integer num_detected) { key avKey = llDetectedKey(0); // get key of av touching me if ( llSameGroup(avKey) ) { var = a; } else { var = b; } }
_____________________
Some people are like Slinkies... not really good for anything, but they sure bring a smile to your face when you push them down the stairs.
|
|
Chris Wilde
Custom User Title
Join date: 21 Jul 2004
Posts: 768
|
04-13-2005 22:59
Thanks for the reply! Thats what I ended up doing, I ran into 2 road blocks. The first was simply trying to figure out how to find someone's key; which the detectkey solved. Then the problem I had next was that llSameGroup didnt work in certain event modes; therefore I tried Touch mode and got it working. Maybe I dont understand all the event modes and when they happen and what they know because I dont see why llSameGroup didnt work in change mode.
|