Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script to give a different object to different avatars

Corwin Carillon
Registered User
Join date: 26 Jun 2006
Posts: 5
03-23-2009 05:52
Does anyone know of a script that will give different avatars in a list a different object? e.g. Object A to Avatar 1, Object B to Avatar 2, etc?

I have searched the forums but maybe I'm not using the right keyworkds. Thanks for any help with a pointer to this.
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
03-23-2009 06:12
Not sure if this is the best way to do it but I would have two lists, AvNames, and ObjectNames, with the names of the recipients and the objects in the same order (i.e. the first item in ObjectNames is intended for the first avatar listed in AvNames);

Then in the touch_start event, I would say something like
CODE

integer n = llListFindList(AvNames, [llDetectedName(0)]);
if n!=-1{
llGiveInventory(llDetectedKey(0), llList2String(ObjectNames, n));
}
Lightwave Valkyrie
Registered User
Join date: 30 Jan 2004
Posts: 666
03-23-2009 18:29
just make a

    of the items in inventory and increment your list each time
_____________________
L$ is the root of all evil
videos work! thanks SL :)