Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

give contents to group only...

LisaMaree Docherty
Registered User
Join date: 8 Mar 2007
Posts: 9
11-09-2007 16:52
I want to make a box that the contents are given free, when touched, only to members of the group... does anyone have a script for this?, or can tell me how to do it? TIA :)
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
11-09-2007 17:03
from http://wiki.secondlife.com/wiki/LlSameGroup


//Gives inventory object only to agents with the same active group
default
{
touch_start(integer total_number)
{
if(llSameGroup(llDetectedKey(0)))
//same as llDetectedGroup(0) (with llDetectedGroup, detected does not need to be in the sim)
llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_OBJECT,0));
else
llSay(0, "Wrong active group!";);
}
}

Should get you going :)
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
11-09-2007 17:04
yes i do, it is a easy script to make,

CODE

default
{
touch_start(integer total_num)
{
key id = llDetectedKey(0);
if(!llSameGroup(id))
{
llSay(0,"You are not in the group!");
}
else
{
llGiveInventory(id,"Object Name");
}
}
}
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-09-2007 17:31
fon't forget they must have the objects group as their active group for this to work
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -