Example what to say: "Welcome Kanji to my place" Example of what is said now: "Welcome to my place"
The first example is what i want it to say, the 2nd is what it currently says, i can no figure out how to make it say the persons name. Here is the code i got so far, i have tried diff commands such as +ava + and +n +, as i am new to scripting i have used those on a couple other scripts for it to relate to people, but it does not seem to work here:
list recent_avatars;
integer chan;
integer n;
integer ava;
add_avatar(string name) {
if(!seen(name)) {
recent_avatars += name;
if (llGetListLength(recent_avatars) > 25) {
recent_avatars = llDeleteSubList(recent_avatars,0,0);
}
}
}
integer seen(string name) {
if(llListFindList(recent_avatars,[name]) > -1) { return TRUE; }
return FALSE;
}
default
{
state_entry() {
llSensorRepeat("", NULL_KEY, AGENT, 20, PI, 5);
}
sensor(integer total_number) {
if(!seen(llDetectedName(0))) {
// speak out loud!
llSay(0,"weclome to my place"
;add_avatar(llDetectedName(0));
}
}
}