Jump to content

Scrtipting Help


Twistted Hand
 Share

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

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

Recommended Posts

Use the HUD script to send a chat message on a unique channel with llRegionSay, and use the script in your titler to receive the message on that same channel and use it as the text in llSetText.  If you are a beginning scripter, take a look in the LSL wiki for example scripts (or scriptlets) in the descriptions of those functions.

Link to comment
Share on other sites

Im not sure im getting it right. This is what i have. 

 

default
{

    touch_start(integer total_number) {

        llSay(-55343,"Does this Work?");

    }

}

 

 

and the listen...

 

 

integer CommandIs(string msg,string cmd)
{
    return llSubStringIndex(msg,cmd) == 0;
}
ParseAndIssueCommand(string cmd)
{

    if (CommandIs(cmd,""))
    {
        string name = llGetSubString(cmd,20,-1);
        if (name == "")
            llSetText("",<0,1,0>,1.0);
        else
            llSetText(name,<0,1,0>,1.0);   
    }
}
default
{
    state_entry()
    {
         llListen(-55343,"",llGetOwner(),"");
    }
        on_rez(integer start_param)
        {
        llResetScript();
        }  
        listen(integer channel, string name, key id, string msg)
    {
        ParseAndIssueCommand(msg);
    }
}
// END //

Link to comment
Share on other sites

You've honestly got so much extra stuff. I will write you a more simple example and explain it.

 

The message sender yours is good.

default
{
    touch_start(integer total_number)
    {
        llSay(-55343,"Does this Work?"); // Send the text on channel -55343
    }
}

 

And secondly the receiver.

default
{
    on_rez(integer p)
    {
        llResetScript(); // Reset the script on attach / rez.
    }
    state_entry()
    {
        llListen(-55343,"","",""); // Allow the object to hear a command/message on channel -55343.
    }
    listen(integer channel, string name, key id, string message)
    {
        llSetText(message,<1,1,1>,1); // This takes the variable 'message' from the listen event which is filled with what was said on that channel spcified above placing it above with llSetText();
    }
}

 

The receiver does not filter out anything it takes any message from anyone and puts it above as long as it's on your channel.

Edited by Scaler Rexen
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2228 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
 Share

×
×
  • Create New...