DelizaLove Posted January 26, 2015 Share Posted January 26, 2015 When I use the llWhisper the name of the object goes out on the local channel. Since I'm using this in a hud, is there a way for the avatars name to come up instead of the objects name ? Thanks Link to comment Share on other sites More sharing options...
Rolig Loon Posted January 26, 2015 Share Posted January 26, 2015 The easiest way to do that is to rename the object. Give it the avatar's name. You could write a script to do that automatically, but it's just as easy to give rename the object "by hand". Link to comment Share on other sites More sharing options...
Nova Convair Posted January 26, 2015 Share Posted January 26, 2015 One detail, you can't change a hud's name permanent while you wear it. (little SL bug) Rez it on ground, rename it, take it back. Link to comment Share on other sites More sharing options...
Estelle Pienaar Posted January 26, 2015 Share Posted January 26, 2015 1.) If you want to let an object talk with a different name in chat you should first, save the existing object name to a global varialbe with llGetObjectName( ). 2.) Then get the name of the owner. Be aware that you will get a different output format if you use llKey2Name or llGetUserName. Try the example below (the example works with touch and not the owner). You will see that for your purpouse, llKey2Name is the better option. (By the way: You need to change this code snippet if you want to get the Key of the object owner and not the person who touches...) default{ touch_start(integer total_number) { key id = llDetectedKey(0); string name1 = llKey2Name(id); llSay(0, name1); string name2 = llGetUsername(llDetectedKey(0)); llSay(0, name2); }} 3.) Change the name of the object vie llSetObjectName(string name) 4.) Say something in chat 5.) Set the name of the object back to the original object name with the global variable (see step 1). Link to comment Share on other sites More sharing options...
Ohjiro Watanabe Posted January 27, 2015 Share Posted January 27, 2015 You could use llSetText and put the message on the hud itself which might be better than using chat. ------------------------------- <- main hud Space for text to display ------------------------------- <- message prim ------------------------------- Link to comment Share on other sites More sharing options...
Xiija Posted January 27, 2015 Share Posted January 27, 2015 You could set the HUD object's name every time it is worn....it will revert to the name you gave it when removed... something like this..... string name; string MYname; init() { name = llKey2Name( llGetOwner() ); MYname = llGetSubString(name,0,llSubStringIndex(name," ")); llSetObjectName(MYname); } default { state_entry() { init(); } on_rez(integer param) { init(); } attach(key id) { init(); } } _______________________________ now when the HUD whispers, it will use the wearer's first name Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now