Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Retrieving audio and text dynamically from an external server?

Robert Widget
Registered User
Join date: 21 Jan 2006
Posts: 18
01-26-2006 16:41
Hello,

I want to create objects that serve up different sounds or text phrases, based on input from the user. The sounds and text phrases will be retrieved from an external web server that I maintain. Does the SL scripting library support that kind of capability, and if so, are there any good tutorials, docs, or existing scripts I can look it?

A few more details:

* Sounds example

- User touches object
- I pop up a menu
- Based on the menu selection I serve up a certain "sound of the day" based on the request. Therefore the sound name cannot be static and a different sound will be served up each day; but which sound is served up is dependent on the user's menu selection and other dynamic parameters. I then play the sound to the user and possibly, transfer the sound to them for use in their inventory.

* Text example

- Use touches object
- I wait for user to input some text
- I send the text to my server which serves up a response that I want to display in-game, and continue the dialogue with the user.

I'm a veteran programmer with many years of web server and other types of programming experience. I just need to know if it's possible to do these things with the SL scripting library and find the quickstart resources to do them.

Thanks.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
01-26-2006 16:47
You'll need to use email for the outbound communications, and email or XML-RPC for the inbound. Check the Wiki for more information and programming examples. I have a working ALICE bot that I sell, that communicates with scripts that reside on my webhost. The interaction interface is exactly like youe described for the text mode. So, yes, it can definitely be done.

Sending a sound file back may be a bit more complex, all I can think of is doing some backend stuff that is picked up by the parcel's media URL. But that would only be usable by someone who owned the land this script was running on, I think.
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
01-26-2006 16:54
you can send a key back that references a sound file, but you would have to have already uploaded the sound.
_____________________
Robert Widget
Registered User
Join date: 21 Jan 2006
Posts: 18
01-27-2006 07:17
Thanks Rickard and Ziggy!