Jump to content
angeoco

Function to make owner say to local chat

Recommended Posts

Hi. I would like to make a HUD to control my boat. The boat only listens to public chat commands from its owner who is sitting on it, and presumably also a crew member who is also sitting on it and has been given the controls. So, it seems I need a function which will make the HUD's owner/wearer say commands to local chat. But all I can find is functions that make the HUD say things, which the boat ignores. Does anybody know of such a function? Thanks a lot.

Edited by angeoco

Share this post


Link to post
Share on other sites

As I understand it, you want to make the boat respond to commands from a HUD worn whoever is sailing it, as well to commands the owner/navigator issues on channel 0.

If that is the case, you will need to be able to edit the boat script to make this work.   The reason for this is that the boat script almost certainly listens only to the boat's owner or, possibly, whoever is sitting in the navigator's position.   You would need to tweak the listener so it listens also to a channel other than 0, preferably a negative one several digits long, that the HUD uses, and then check in the listen event that the HUD belongs to the owner/skipper.

If that's not possible, the only work-around would be to have the HUD put up a llDialogMessage using channel 0, and have the user choose messages using the buttons.   Since llDialog makes the viewer say the message on the specified channel, saying "Start" in chat and pressing a button labelled "Start" on a llDialog menu that uses 0 as its  channel amount to the same thing.  But I would edit the boat script if at all possible. 

  • Like 2

Share this post


Link to post
Share on other sites

1) If the boat's script was written to only listen for the owner's UUID: this will only work if the actual owner says the commands.

2) If the boat's script was written to also listen for chat from objects OWNED by the owner: Have any object say the command.

3) I very much doubt that having an object "impersonating" the owner by "renaming it" to the owner's name will work in this case, the way you described it.

  • Like 1

Share this post


Link to post
Share on other sites

Possibly not relevant here, but…

If you're just trying to avoid the hassle of having to type out commands then you might consider using gestures tied to function keys to issue them.

Also, many vehicle scripts will let you specify and use a non-public chat channel to issue commands, which is aesthetically more pleasing (and something both llDialog and gestures can accommodate with ease).

  • Like 1

Share this post


Link to post
Share on other sites

Thanks a lot for those replies! The boat's script can't be modified, so it sounds like Innula's blue menu suggestion is the best option. I will give that a go.

:)

Update: Thanks KTK! The gestures option might work, I will look into that too.

Edited by angeoco

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...