RyanJ89 Posted August 25, 2019 Share Posted August 25, 2019 Hello Good People, I have scripted an object to wear when a certain group is active, but I want it to be able to wear it as long as they're in the group not just when it's active. My script is below help me please, I have a deadline to meet! key allowed_group = "GROUP_UUID_HERE!"; default { attach (key id) { llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION); list details = llGetObjectDetails(llGetKey(), [OBJECT_GROUP]); key object_group = llList2Key(details, 0); if (id != NULL_KEY) { if (object_group != allowed_group) { llOwnerSay ("Access denied."); llRequestPermissions (id, PERMISSION_ATTACH); } } } run_time_permissions (integer permissions) { if (permissions & PERMISSION_ATTACH) { llDetachFromAvatar (); } } on_rez(integer permissions) { llDie(); } } Link to comment Share on other sites More sharing options...
Rolig Loon Posted August 25, 2019 Share Posted August 25, 2019 (edited) There's no way to detect whether a person is in a group unless the group is active. However, as written, your script only checks 29 minutes ago, RyanJ89 said: if (object_group != allowed_group) when the object is being attached or detached. Therefore, if the person attaches the object and then makes her group inactive, the script should not lose permissions. So, just tell anyone in the group to make the group active, wear the object, and then keep it attached as long as it is needed. Edited August 25, 2019 by Rolig Loon typos. as always. Link to comment Share on other sites More sharing options...
RyanJ89 Posted August 25, 2019 Author Share Posted August 25, 2019 Thank you. Link to comment Share on other sites More sharing options...
Kyrah Abattoir Posted August 25, 2019 Share Posted August 25, 2019 (edited) 2 hours ago, RyanJ89 said: on_rez(integer permissions) { llDie(); } ...really? This isn't security. Edited August 25, 2019 by Kyrah Abattoir Link to comment Share on other sites More sharing options...
RyanJ89 Posted August 26, 2019 Author Share Posted August 26, 2019 No, it's to kill the object if it's not the right group. Link to comment Share on other sites More sharing options...
RyanJ89 Posted August 26, 2019 Author Share Posted August 26, 2019 I was told by someone that there's a way to script where you can rez an object and get the group from the land, then if they aren't in the group they cannot wear the item. Do you know if that's possible to work correctly? 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