sim or sl wide commands to skybox/object possible?
|
|
Kara Jefferson
Registered User
Join date: 20 Dec 2007
Posts: 36
|
01-28-2008 00:44
This may be a really stupid question but here goes; I just bought a skybox that I can command it via /99 commands and a menu system. But what If I forgot to lock it or that sort of thing... Would there be a way to "chat" with the skybox in the same sim or somewhere else in sl without teleporting within range of the chat commands? Maybee a way to actually chat to an object? eg. name is "door control" so can I chat to that object in im to shut doors and lock?
|
|
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
|
01-28-2008 01:06
If you have permissions to modify the skybox script, your options are many! You could create a controller object such as you suggested, that could send messages to the skybox using llRegionSay, or get a little more complicated and use llEmail messages if you want to do it from another region. For the llRegionSay method, you'll probably only have to modify the skybox script(s) so that instead of only listening to the owner, it filters out messages based on whether they are from something owned by the owner (avatar is included). It will work beautifully in no time  For the llEmail method, I'd have the remote use llRegionSay to ask the skybox for its email address when in the same region... and have the system give you a reply after processing a command, so you know whether the remote worked or it needs to be checked in at the skybox again. If you don't have permission to edit the skybox script(s), hmmm... if you were a slproxy user you could throw your voice to the skybox from anywhere in the sim, pretty easily  Or, perhaps you could ask the creator of the skybox to send you a custom copy, changing the listen so that it listens for objects too, and filters out messages by llGetOwnerKey(sender). Then you'd be able to apply the llRegionSay method with ease.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-28-2008 01:34
Hmm. I think you could even work out a way of using llRequestPermissions(llGetOwner(), PERMISSION_DEBIT) to trigger a command (see http://www.lslwiki.net/lslwiki/wakka.php?wakka=PERMISSION_DEBIT). Maybe request the permission when the owner first comes online, and every hour thereafter. LOL. Okay. Don't shoot me now.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-28-2008 01:51
Here's a slightly more serious suggestion. As mentioned by Day Oh, conscientous scripters often check the OWNER of the thing issuing a chat command, rather than the identity of the speaker. For example, instead of: listen(integer channel, string name, key id, string message) { if (id != llGetOwner()) { return; } // Process command }
the script might use: listen(integer channel, string name, key id, string message) { if (llGetOwnerId(id) != llGetOwner()) { return; } // Process command }
This facilitates the use of HUDs and other helper objects. If it happens the construct you are using is built like that, you could setup a nearby relay object which can accept commands through any of the methods listed above and then relay the commands to chat. Beware that there is a security vulnerability in setting up chat interfaces like this, though. DO NOT USE IT FOR CRITICAL SYSTEMS! If someone manages to give you an object (attachment or otherwise) with a general chat relay in it, they could easily use it to issue commands to your objects. That being said, this is a great way for making non-critical systems more versatile.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
01-28-2008 04:24
If you give the list of commands used, then I'll post a script that will pop up a menu with those choices. When you touch the menu button, the message will be broadcast on /99 throughout the sim. Using llDialog like that will mean it will be coming from your key, instead of the object key.
You could then have it on the ground ar wear it as an attachment with one discrete button on your HUD.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
01-28-2008 05:30
Supply a list of the commands that are used and I'll cobble something together this afternoon.
An attachment that when touched will llRegionSay a message to a script in the skybox. The skybox script will pop up a llDialog box for you anywhere in the sim and when you touch the desired button it will say the command on chan 99 as if you were saying it.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
01-28-2008 05:57
Nevermind, already made it: Put this script in an object in the skybox and edit the list of commands: list commands = ["test", "Open"];//Change this to the commands you use integer chan = -4654878; key owner_id; owner() { owner_id = llGetOwner(); }
default { state_entry() { owner(); llListen(chan, "", "", "ping"); } listen(integer channel, string name, key id, string message) { if(llGetOwnerKey(id) == owner_id){ llDialog(owner_id, "command relay", commands, 99); } } }
Then put this script in an object, size it to fit and attach to one of your HUD points: default { touch_start(integer n) { llRegionSay(-4654878, "ping"); } }
Tested it up to 5000 meters away(straight up) and it works fine. You will have to be in the same sim thou.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Rock Ryder
Registered User
Join date: 6 Oct 2006
Posts: 384
|
01-28-2008 10:14
From: Kara Jefferson This may be a really stupid question but here goes; I just bought a skybox that I can command it via /99 commands and a menu system. But what If I forgot to lock it or that sort of thing... Would there be a way to "chat" with the skybox in the same sim or somewhere else in sl without teleporting within range of the chat commands? Maybee a way to actually chat to an object? eg. name is "door control" so can I chat to that object in im to shut doors and lock? Hi Kara, I have knocked up a very simple cross-sim comms system for you to play with. Contact me inworld and I will be happy to pass a copy to you. Rock
|
|
Kara Jefferson
Registered User
Join date: 20 Dec 2007
Posts: 36
|
01-30-2008 08:31
thank you all who wrote to me, and to rock, I will test out his script and see if working
|