Tuesday 29 March 2011

Sample Aurora NPC Scripts: Make bot move

This one will make the bot (whose UUID is specified in the string) move 2 units Yward and then 2 units Xward by walking.


default
{
state_entry()
{
llSetText("Make bot move", <1,0,0>, 1.0);
}
touch_start(integer a)
{
string botID = "271419d4-a01d-4432-83f7-64cae13c86bf";
//Now give it a list of positions to go around
list positions = [llGetPos(), llGetPos() + <0, 2, 0>, llGetPos() + <2, 0, 0>];
//Now tell it how it will get there
//0 - Walk to the next target
//1 - Fly to the next target
list types = [0,0,0];
//Now tell the bot what to do
botSetMap(botID, positions, types);
}
}

1 comment: