Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Having issue getting script to say owners first name

Lea Vendetta
I broke my invetory
Join date: 22 Sep 2007
Posts: 97
09-26-2008 20:13
ok i had a friend help me and she got me the following, what we are trying to do now is figure out how to get the script to say the first name of the owner of the object when touched.



default
{
touch_start(integer total_number)
{
string fullName = llDetectedName(0);
string firstName = llList2String(llParseString2List(fullName,[" "],[]),0);
llWhisper (0, "lala "+firstName+ " grrrrr";);
}
}

what i am trying to get is where the script will say the owners first name before "lala"

Any help or a point in the right direction would be appreciated, i have no idea what i am searching for so i haven't been able to find anything.
_____________________
Amara Twilight
Registered User
Join date: 16 Feb 2004
Posts: 47
09-26-2008 20:43
currently your script has this output: Object whispers: lala Amara grrrrr
So it seems to be doing what you want it to do. It says the persons first name only.

I'm no scripter, or not an advanced one by any means but lets brake down the line where the name is spoken...

llWhisper (0, "lala "+firstName+ " grrrrr";);

Thats your line

First its whispering the persons name instead of saying it or shouting it or telling the owner of said object the name. thats the llWhisper command

its saying it on channel 0, which is the default local chat channel

it then says "lala "
then takes the firstname from the date it got from the toucher with this part +firstName+
finally it then says " grrr"
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
09-26-2008 20:49
if i understand you correctly, you need to add llKey2Name(llGetOwner()) to it somewhere. maybe like this?

From: someone

default
{
touch_start(integer total_number)
{
string ownername = llKey2Name(llGetOwner());
string ownerfirstname = llList2String(llParseString2List(ownername,[" "],[]),0);
string fullName = llDetectedName(0);
string firstName = llList2String(llParseString2List(fullName,[" "],[]),0);
llWhisper (0, ownerfirstname + " lala "+firstName+ " grrrrr";);
}
}


if this was in your object and i touched it, it would whisper: Lea lala Ruthven grrrrr
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Lea Vendetta
I broke my invetory
Join date: 22 Sep 2007
Posts: 97
09-26-2008 20:50
Thank you so much Ruthven that is exactly where i was stuck.
_____________________
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
09-26-2008 20:54
no problem at all, i'm often on here skipping around for help, and occasionally can help with questions other people have
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369