Gemini Breil Posted August 17, 2011 Share Posted August 17, 2011 Hi, I'm trying to create a demo of my HUD and I was planning to have people join my group to make a full version demo work. I was trying to have my script check to see if the avatar was in my (active) group using the following: list idList = llGetObjectDetails(llGetOwner(),[OBJECT_GROUP]);I would then compare the idList to my group key but the idList always comes back as a bunch of zeros like null key. I am suspecting you can't do this with an avatar. Any ideas on how to do this would be appreciated very much! Link to comment Share on other sites More sharing options...
Helium Loon Posted August 17, 2011 Share Posted August 17, 2011 You can't do that with an avatar.....using llGetOwner() or such in that call won't work. ( the OBJECT_GROUP parameter specificaly notes that if the key specified is an avatar, it will return the NULL_KEY.) The only thing you can check is the ACTIVE group an avatar has with the llSameGroup(key agent) function. Which will also return true if the object isn't group owned! So any object you used in this way would have to be owned by that group first. Then you could use the above function to determine if a given avatar had that group as their active group. Link to comment Share on other sites More sharing options...
Rolig Loon Posted August 17, 2011 Share Posted August 17, 2011 Nope, but you can easily create an object, set it to your group and then just have each person touch it. Use touch_start(integer num){ if(llSameGroup(llDetectedKey(0)) { llSay(0, "You're a group member!"); } else { llSay(0,"You're not a group member yet. Would you like to be?"); }} You could use a sensor or collision to do the same thing if you don't like touch. /me curses the forum software for messing up her code..... Link to comment Share on other sites More sharing options...
Gemini Breil Posted August 17, 2011 Author Share Posted August 17, 2011 Oh you gave me an idea! If the person has my group active then wears the HUD, the hud will be in my group right? Then I can test to see that the HUD is in my group and the avatar is in the same group. If both are true I can activate the HUD. Correct? Link to comment Share on other sites More sharing options...
Rufus Darkfold Posted August 18, 2011 Share Posted August 18, 2011 Helium Loon wrote: …The only thing you can check is the ACTIVE group an avatar has with the llSameGroup(key agent) function.Which will also return true if the object isn't group owned! So any object you used in this way would have to be owned by that group first. Then you could use the above function to determine if a given avatar had that group as their active group. It worked for me with the object merely set to the group of interest. I just re-tested my restricted transporter that uses that call, and it still refuses to go if I don't have the right group tag set. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now