Jump to content

Listening messages on public channel


MikroPoli
 Share

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

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

Recommended Posts

I'm making a HUD for my boat and I'm having a small problem. I'm not an experienced script writer so it is probably just me. I'm trying to read feedback from the boat after executing some commands. I can see the text in the local chat window. For example [16:32] Bandit 55: Powering Engine... However when I listen to messages on channel 0 I don't get this message. I have no filters set in the listen call listenHandle = llListen(0, "", "", ""); 

Messages from other senders are coming through but not from "Bandit 55". Any ideas why this is happening? Thanks. 

Link to comment
Share on other sites

Simply opening a channel isn't enough.  Your script has to have a listen event in which it receives messages on the open channel and does something with them.  In your case, something very simple should do the job

listen (integer channel, string name, key id, string message)
{
    llSay(0, message);
}

Study the LSL Wiki ..... http://wiki.secondlife.com/wiki/LlListen#Examples

That's rather silly, of course, since you are already hearing the message in chat.  Therefore, I assume that you want do do something else with it. That something else goes in the listen event.

Edited by Rolig Loon
  • Like 1
Link to comment
Share on other sites

No mod perms. This is a popular boat (Bandit 55) so I'm sure the creator would not allow that. I'll just have to find a reliable way to maintain the state of the boat based on the actions of my own script.

This was my first post on the forum so I must say I was very pleasantly surprised how quickly I was able to get good answers to my problem. Thanks for your help guys.

  • Like 1
Link to comment
Share on other sites

I am not a sailor myself, so I do not know how the Bandit is scripted or what options the designer may have built into it.  You might ask, though.  Some scripters (like me, on occasion) will add a special channel that broadcasts selected messages ( or sends them by llMessageLinked ) so that you can pick them up with a custom script.

Link to comment
Share on other sites

I think the different boats from the creator in question, are scripted by different programmers and hence behaving a little different, but all based on the BOSS Dynamic Sailing Engine.

On my (TMS) Ushuaia the documentation on the boat specifies, it is listening to channel /29000 and I can make my own HUD for example to send the basic commands like jib etc.

Try and look in the documentation to your Bandit.

  • Like 1
Link to comment
Share on other sites

10 hours ago, MikroPoli said:

No mod perms. This is a popular boat (Bandit 55) so I'm sure the creator would not allow that. I'll just have to find a reliable way to maintain the state of the boat based on the actions of my own script.

This was my first post on the forum so I must say I was very pleasantly surprised how quickly I was able to get good answers to my problem. Thanks for your help guys.

Hi,  a friend of mine already spoke to the creator of the Bandit, and they will not work with anyone on this.  Her idea was to feed keyboard data to the boat via script to automate sailing tours - and she had asked me for help.  Perhaps some day, he will relent.  Btw, llRegionSayTo() works fine for communicating between objects, but llOwnerSay() only sends text messages to the owner of the object, not the object itself.  Best of luck!

Edited by Luhkey
Link to comment
Share on other sites

4 hours ago, Rachel1206 said:

On my (TMS) Ushuaia the documentation on the boat specifies, it is listening to channel /29000 and I can make my own HUD for example to send the basic commands like jib etc.

I found the channel 29000 to be working on Bandit as well and I have all the commands in my HUD. Now I'm trying to get real time information displayed in HUD. It is the same information as the navigation instruments of the boat show. It would be more convenient to have in the HUD. I have speed, heading and depth already but getting any feedback from the boat does not seem possible.

Link to comment
Share on other sites

49 minutes ago, MikroPoli said:

Is the idea to have the boat sail automatically a pre set course? That sounds interesting :)

Yes, that was the idea, but there's no way to communicate the captured keystrokes back to the boat scripts.  There's no open API.  LOL.

Link to comment
Share on other sites

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