views:

13

answers:

1

how much time does it take to create a simple dance performing bot in second life using Linden Scripting Language ?? , i have no prior knowledge of lsl , but i know various object oriented and event driven programming languages .

A: 

Well, it's pretty simple to animate avatar: you'll need a dance animation (those are pretty easy to find, or you could create your own), put it in a prim (which is basic building object in SL), and then create a simple script which first requests permission to animate desired avatar:

llRequestPermissions(agent_key, PERMISSION_TRIGGER_ANIMATION);

You receive response in run_time_permissions event and trigger your animation by name:

run_time_permissions(integer param) 
{
    llStartAnimation("my animation");
}

Those are the essentials; you'll probably want to request permissions when an avatar touches your object, and stop animation on second touch... or you could request for permissions for each avatar which is in certain range.

As for the "bot" part, Second Life viewer code is open source; if you don't want to build it yourself, there are several customizable bots available. Or you could simply run an official SL viewer and leave it on; there is a way to run several instances of SL viewer at the same time. It all depends on what exactly you need it for.

Official LSL portal can be found here, though I prefer slightly outdated LSL wiki.

Domchi
thanks for the reply , it's pretty clear . but can't i host my bot on some website , as essentially it's just a script .
rajat
how can i give commands to my bots from typing in to a particular channel in local chat from another avatar ?? For ex: i want to activate sit function when in particular channel of local chat "sit" command is given .
rajat
The bot needs to connet to SL; you can have bot interface through the website but the bot itself is a piece of code which has to run somewhere. Google it for more details, I didn't use one so I can't offer much advice there. As for giving commands, typing "/1 sit" in chat in SL client will say "sit" on channel 1. Channel 0 is chat channel heard by nearby avatars, so saying "/0 blah" is the same as saying just "blah".
Domchi