Jump to content
You are about to reply to a thread that has been inactive for 4279 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Posted

Hey guys.. Ive made a HUD with various buttons that give chat based on the button pushed.. pretty run of the mill. However.. I want the HUD name on llsetobjectname to become the name of the avatar wearing it. So that instead of , for example

"HUD: Cobalt Firehawk asks for script help"

 

I get simply

 

"Cobalt Firehawk asks for script help"

 

Thanks!

Posted

thanks! that was fast! In addition... what would be the best way to go about making it so that they can customize the object name via chat.. its for an RP sim and some folks have different "character" names than there actual SL name. 

Posted

Something simple, kept the naming the same so you have a ref to the wiki

integer listen_channel = 9;integer listen_handle;default{    on_rez(integer i)    {        llResetScript();    }        state_entry()    {        llSetObjectName(llKey2Name(llGetOwner()) + " asks for script help");    }    touch_start(integer total_number)    {                listen_handle = llListen(listen_channel, "", llGetOwner(), "");        llSay(0, "Type your desired name: /"+ (string)listen_channel +" <name>");        llSetTimerEvent(60);    }        listen(integer listen_channel, string name, key id, string message )    {        if (id = llGetOwner()) llSetObjectName(message + " asks for script help");        llListenRemove(listen_handle);    }        timer()    {        llSay(0, "60 seconds passed, try again.");        llListenRemove(listen_handle);    }}

 http://wiki.secondlife.com/wiki/LlListen
http://wiki.secondlife.com/wiki/Listen
http://wiki.secondlife.com/wiki/LlSetTimerEvent

 

You are about to reply to a thread that has been inactive for 4279 days.

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
×
×
  • Create New...