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

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

Recommended Posts

So, I've been around for a while and I've collected my fair share of objects. Who hasn't these days? lol But, one of those objects has a hud that has an option to allow you to speak as the object. My question, though, is, where, or how can I find the script to recreate such a thing? Not the entire system, but, just the part that gives the ability to type into a hud and have an object in local/nearby chat act as though it was the one that spoke. So, like, say I was elsewhere on a different sim, and the object in question was "listening" or so, to whoever was nearby, and i wanted to "speak" through the object, using the hud. I know it's possible to speak as an object, I just don't know how to either recreate or find the script that allows you to type into a hud and use it to "speak" as an object.

Link to post
Share on other sites

First things first; you can't speak as the object.

The object is listening to and repeating messages.

If you're wearing the object (or it's within chat range) but you want to speak through the object without your messages being seen, you must speak on some channel other than 0 (local) and the object must be listening, and using llWhisper/Say/Shout on channel 0.

If the speaker is in another sim and you want to talk to it via some HUD (again, something in chat range), you're going to need some really impractical methods for your HUD to message the speaker.

Your options for cross-sim communication is llEmail (20 second delay between messages) or llHTTPRequest (no way to know the speaker's URL if speaker and HUD go off-world at the same time), or a webserver (static URL but a hurdle to set up).

Edited by Wulfie Reanimator
Link to post
Share on other sites

Oh. I see. Well, that's slightly disappointing then. But, at least it's an answer. IMs it is. lol Mailboxes and things seem to still be the way to go. I'm fine with that. 

 

The object I was talking about was the Blasphemy dragon, and, now that you mention it, you do have to wear the object, then, you type into the hud that comes with it, which then tells the object what to say on another channel and then the---- well, just as you said. 

Since it exists in that object, it should be possible to recreate that part of said object, right?

 

Link to post
Share on other sites
21 minutes ago, LunaRavencroft said:

Since it exists in that object, it should be possible to recreate that part of said object, right?

Sure. Here's the HUD code:

default
{
    // When this object is touched:
    touch_start(integer total_number)
    {
        // Give the owner an input dialog, which will be sent to channel -1.
        llTextBox(llGetOwner(), "Message:", -1);
    }
}

And here's the speaker code:

default
{
    // When the script starts:
    state_entry()
    {
        // Start listening for messages from the owner on channel -1.
        llListen(-1, "", llGetOwner(), "");
    }
    
    // When a message passes the llListen filter:
    listen(integer channel, string name, key id, string message)
    {
        // Just send the message as-is to channel 0.
        llSay(0, message);
    }
}

And there you go.

Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 376 days.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...