|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
12-07-2008 07:06
ive been working on this idea for a wile, it works with 1 group but i cant seam to get it to work with multigroup keys any ideas? default { touch_start(integer t) { string groupID =llList2String(llGetObjectDetails(llGetKey(), [OBJECT_GROUP]), 0); string gid2 = ""; // group id string gid3 = ""; string gid4 = ""; { if(groupID == gid2) { // something } // and so on } } } }
|
|
FireEyes Fauna
Registered User
Join date: 26 Apr 2004
Posts: 138
|
12-08-2008 07:20
default { touch_start(integer t) { string groupID =llList2String(llGetObjectDetails(llGetKey(), [OBJECT_GROUP]), 0); string gid2 = ""; string gid3 = ""; string gid4 = "";
if(groupID == gid2) { // something } else if (groupID == gid3) { //do something else } } }
Keep in mind that llGetObjectDetails only works on objects and not avatars. The way this code is setup, it's checking the object that is touched's group which will work fine. It won't however work to do something different when avatars touch it depending on their active group.
|
|
Lennard Lopez
Registered User
Join date: 9 Oct 2007
Posts: 52
|
12-08-2008 08:53
With llGetGetKey() you get the key of your own object. You already know the group which it is set to. You want to have the key of the agent that clicks. Then use llDetectedKey(0). But.... If you look at the description op llGetObjectDetails you will find out that you get a null-key for agents. This doesn't work!!
|
|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
12-08-2008 17:22
ya i have to change it around to work on state entry, but other than that should it work?
|
|
Nexii Malthus
[Cubitar]Mothership
Join date: 24 Apr 2006
Posts: 400
|
12-08-2008 17:23
If you attach an object or rez a new one it will be set to your current tag, you can use that for authentication for say in a weapon, tool, hud, vehicle or other so that you may limit, restrict and enable features, or the entire object itself. Yep, FireEyes' version should work perfectly alright.
_____________________
 Geometric Library, for all your 3D maths needs. https://wiki.secondlife.com/wiki/Geometric Creator of the Vertical Life Client
|