|
Turokhan Legion
Vortech Enterprises CEO
Join date: 22 Jul 2007
Posts: 32
|
07-05-2008 05:32
Hey all,
I've made a simple object that scans the area. In the script is an access list for those who it will ignore. The object plays a sound and alternates colors if an avatar is in range that isn't on the list.
My question is, how can i add a function to add avatars to the list using chat?
For e.g add someones name
Just want a more conventional way to add names rather than editing the script...need my partner to be able to add stuff too.
Any help greatly apreciated
|
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
07-05-2008 08:08
From: Turokhan Legion My question is, how can i add a function to add avatars to the list using chat?
list namelist; default { state_entry() { //listen for owner on channel 2 llListen( 2, "", llGetOwner(), ""); }
listen(integer kanal, string name, key id, string message) { //add message to list (what owner said on channel 2) namelist += [message]; } }
_____________________
From Studio Dora
|
|
Daten Thielt
Registered User
Join date: 1 Dec 2006
Posts: 104
|
07-06-2008 09:16
i prefer this way if(msg == "Add Name") { llSay(0, "Please say addname= followed by the person for example addname="+llKey2Name(llGetOwner())); llSay(0, "Please note only the owner can do this and the name must be exact"); TempChan = llListen(0, "",llGetOwner(),""); } if(llSubStringIndex(msg, "addname=") >= 0) { string person = llGetSubString(msg, 8, llStringLength(msg)); llSay(0, person+" Has been added to the list"); name += [person]; llListenRemove(TempChan); }
|
|
Turokhan Legion
Vortech Enterprises CEO
Join date: 22 Jul 2007
Posts: 32
|
07-06-2008 10:58
Thanks guys Just what i needed
|