Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Display text in the main chat without the object name

QuarkZ Kawashima
Registered User
Join date: 11 Sep 2008
Posts: 2
11-18-2008 06:14
Hi!

I try to understand how to send a message in the main chat without the object name.
Usually when u use llSay, you have :
"Object : the button was touched" (returned in green in the chat)
and i would like :
"The button was touched"

I know that it's possible because i see many stuff like that. For example the spankers always return
"Someone spank..." (still in green in the chat, but we don't see the name of the prim where the script is attached)

Does someone know how to do that?

Thx
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-18-2008 06:18
blank out the object name, then use /me in the text sent to chat. that'll remove both the name and the leading ':' though you may get a leading space
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
QuarkZ Kawashima
Registered User
Join date: 11 Sep 2008
Posts: 2
11-18-2008 06:41
Ah thank you!

Seems that /me uses the name of the object, so instead of blank it, i only put my name :)
Thx for the tips, it's helped me a lot :)
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
11-18-2008 14:57
Try:
CODE
default
{
state_entry()
{
//
}

touch_start(integer total_number)
{
string myName = llGetObjectName(); //store the object's name
llSetObjectName(""); //blank it out
llSay(0, "/me The button was touched");
llSetObjectName(myName); //give it the original name back
}
}



or, you want to use the toucher's name,
CODE
  llSay(0, "/me " + llKey2Name(llDetectedKey(0)) + " touched the button.");
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
11-18-2008 16:21
Why not strip off the first word you want to say for the object's name? For example, if you want it to say "The button was touched.", set the object name to "The" and then chat "/me button was touched."
Wouter Hobble
Registered User
Join date: 25 Mar 2008
Posts: 21
11-20-2008 04:10
From: Hewee Zetkin
Why not strip off the first word you want to say for the object's name? For example, if you want it to say "The button was touched.", set the object name to "The" and then chat "/me button was touched."

That's what I do to make sure you get no spaces or whatever. Not sure if it is needed.