Jump to content

Hello how to replace a gesture that says something in the chat with a click button


Tzimix
 Share

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

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

Recommended Posts

Hello there I expose my problem of the day lol ...

I made a kind of ball to wear that when I type /99 run in the chat or if I use a gesture that says /99 run it makes me run for a short time

how can I create a button to wear in hud that when I click on it replaces my gesture or my command in the chat?

Basically a button when I click on it says /99 run and activates the script in the cube I'm wearing.

I made with a simple script but of course it doesn't work because it gives the name of my object when I click on it ... so I really don't see how to tinker with it...

thank you in advance if any of you have an idea of what you would like to see.

beautiful day

 

Link to comment
Share on other sites

The script that's listening for "/99 run" is evidently listening specifically to you. Instead it's going to need to get messages from the HUD you want to script, perhaps by listening to everything, then filtering down received messages to only those from objects with the same owner.

Link to comment
Share on other sites

a way is to use dialog buttons to chat on the channel. Example:

 

default
{
    touch_start(integer total_number)
    {
        // some texts you want to say
        list buttons = ["run", "jump", "hop"];
        
        // will say the button text on channel as if it comes from owner
        llDialog(llGetOwner(), "Say something\n", buttons, 99);
    }
}


// simple listener test script in other object
default
{
    state_entry()
    {
        llListen(99, "", llGetOwner(), "");
    }

    listen(integer channel, string name, key id, string text)
    {
        llOwnerSay(llKey2Name(id) + " said: " + text);
    }
}

 

Link to comment
Share on other sites

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