Ill do some set up here....
Object 1 : A user touches this to do some stuff. It also gets their key.
Objects 2-6 : and object collides with these, after the user does some stuff.
Object 7 : Listens to object 1 to get the user key. it also needs to listen to objects 2-6 to know which object was colloded with.
Object 7 is unlinked. Objects 1-6 are linked (along with other objects)
Upon hearing which object it is collided with, it will give an paticular inventory item to the person (key) from Object 1.
here is the code for the listening/giving object (Object 7)
///////////////////////////////////////////////////////////////////////////////////////
string names;
default
{state_entry()
{llListen(-900,"","",""
;llListen(-9001,"","",""
;}
listen(integer channel, string name, key id, string mesb){
if(channel==-900) {names==mesb;
llSay(0,mesb);}
if(name=="3 Det"
{llGiveInventory((key)names,"tucman"
;llSay(0,names);}
}
}
////////////////////////////////////////////////////////////////////////////
"3 Det" is one of the collision detectors. (objects 2-6)
channel -900 is the channel that Object 1 says the key
channel -9001 is what "3 Det" talks on.
the llSay(0,""
is just for my debuging.what is happeing is well...nothing.
No inventory item is given, and when it gets done, the string names = nothing
Ive tried about every permeutation I can come up with, but alass, I got notin'
I even tried sending the key to a listen in the dectors, so that they could say the key and their own name to the listener/giver. But that interfered with the collision_start().
Thank you very much in adavnace!
Tuc!