Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sound when my name is typed

Hialeah Choche
Registered User
Join date: 17 May 2007
Posts: 2
07-11-2007 07:29
Often times I'm online and look away for to long just to realize that someone has been chatting with me. I'd like for my typed name to prompt a sound to play. Is this possible and if so how do I do it?

Hialeah Choche
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
script it
07-11-2007 11:11
it would be easy to write a script that will scan for your name, and make a sound. You could put it in some object you always wear, such as your hair or a ring.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
07-11-2007 23:02
//
CODE
//Little something i banged together, enjoy ^_^
//Written by Strife Onizuka

//Set name to your first name or nickname (if you don't it defaults.
string name = "";
//set sound or it will use the first one it finds in the object inventory.
string sound = "";
float volume = 1.0;

toggle()
{
if((on = !on))
{
w = llListen(0, "", "", "");
llSetColor(<0.0,1.0,0.0>, ALL_SIDES);
}
else
{
llListenRemove(w);
llSetColor(<1.0,0.0,0.0>, ALL_SIDES);
}
}

integer on;
integer w;

default
{
state_entry()
{
toggle();
if(sound == "")
sound = llGetInventoryName(INVENTORY_SOUND, 0);
if(name == "")
{
name = llToLower(llKey2Name(llGetOwner()));
name = llDeleteSubString(name, llSubStringIndex(name, " "), -1);
}
}
touch_start(integer a)
{
toggle();
}
listen(integer a, string b, key c, string d)
{
if(~llSubStringIndex(llToLower(d), name))
llPlaySound(sound, volume);
}
}
//
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Samaira Vieria
Registered User
Join date: 5 Apr 2007
Posts: 114
08-18-2007 06:55
The MSS Radar HUD has a chat monitor that can be toggled on & off to alert you by a sound when your name or keywords are mentioned in chat, it also has many other useful features =)