Jump to content

Touch changed texture in order script but chat command


maramaCALI
 Share

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

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

Recommended Posts

I have a stage and script that by touch changes textures each time it’s touched in order. I NEED my spot on system button to control it rather then touching the object. How can I change the touch_start into a chat command AND know what ch it’s under so I can program the hud to do it instead?

Link to comment
Share on other sites

Right now, it's probably not using any channel at all, since it's not having to listen to some other object or person.  If you want to make it respond to a HUD, you'll have to add that capability to both scripts (assuming that you have mod perms for your current script).

Link to comment
Share on other sites

Scripts respond to chat commands via the listen event. And in order to get the script to listen, you must first set up a listen filter via the llListen function. That is where you specify what channel (along with other possible filters) the script will listen for. Since you are scripting the stage script and the HUD script, you alone will know what channel they communicate on. However, it would be a good idea to specify additional filters in the llListen function. This is to safeguard against any other sources that might just happen to use the channel you picked by pure luck. Since you are going to make a HUD, give it a distinct name and then use that name in the llListen filter along with the channel you want. That will make the stage script only listen to objects with the exact same name as the HUD on the channel you specified.

As for the HUD itself, you have several options for having it broadcast its chat command. If both you and the stage are in the same region, consider using llRegionSay which as the name suggests, can reach anything in the same region.

Link to comment
Share on other sites

On 6/26/2020 at 8:38 AM, Fenix Eldritch said:

Scripts respond to chat commands via the listen event. And in order to get the script to listen, you must first set up a listen filter via the llListen function. That is where you specify what channel (along with other possible filters) the script will listen for. Since you are scripting the stage script and the HUD script, you alone will know what channel they communicate on. However, it would be a good idea to specify additional filters in the llListen function. This is to safeguard against any other sources that might just happen to use the channel you picked by pure luck. Since you are going to make a HUD, give it a distinct name and then use that name in the llListen filter along with the channel you want. That will make the stage script only listen to objects with the exact same name as the HUD on the channel you specified.

As for the HUD itself, you have several options for having it broadcast its chat command. If both you and the stage are in the same region, consider using llRegionSay which as the name suggests, can reach anything in the same region.

The spot on system hud is not something I build it’s on my it has option to give button a command. Which requires ch # for that command to go

Link to comment
Share on other sites

Unless you are very lucky (or the scripter who made your stage was either lazy or clumsy) it will be extremely diffficult to figure out what channel it might accept a command on, if it is even scripted to accept a chat command at all.  Its script is probably not modifiable, so you can't peek into it to either identify the channel or change it. 

Link to comment
Share on other sites

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