Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

say only avatars FIRST name?

Yuriko Nishi
Registered User
Join date: 27 Feb 2007
Posts: 288
07-21-2009 07:22
hi :)

i want an object to only say the avatars first name and leave away the second name.
i use llKey2Name to get the names of the avatars (who sit on the object)

i saw and object a while ago that did it, but i cant remember what it was.

can someone please give me some help how to do it?

thanks :)
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
07-21-2009 07:41
It might not be the most elegant way, but you could try

string BothNames = "Firstname Lastname";
string Firstname = llList2String(llParseString2List(BothNames, [" "],[" "]),0);
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
Tali Rosca
Plywood Whisperer
Join date: 6 Feb 2007
Posts: 767
07-21-2009 07:50
Or
llGetSubString(fullname, 0, llSubStringIndex(fullname, " ";) - 1);
Yuriko Nishi
Registered User
Join date: 27 Feb 2007
Posts: 288
07-21-2009 07:58
wow thanks that was quick

i use tali“s way.

thanks! love you both :)