The script isn't working right -- it just makes the object go in a random direction. I think the problem is with the vector avpos. I read that in this forum that llGetDetectedPos(0) returns a vector of your avatar's position, but I'm not sure it's working. Any suggestions?
October7th
------------------------------------------
vector startposition;
default
{
state_entry()
{
//Confirm readiness, calculate start position of object
llListen( 0, "", llGetOwner(), ""
; llSay(0, "Ready."
;startposition = llGetPos();
}
//listen to command
listen( integer channel, string name, key id, string message )
{
//comehere command sends to comehere state
if (message == "come here"

{
state comehere;
}
}
}
state comehere
{
state_entry()
{
//confirm state change
llSay (0, "Coming."
; //get my avatar position
vector avpos;
avpos = llDetectedPos(0);
//create random offest of space
float x_distance = llFrand(1.0);
float y_distance = llFrand(1.0);
float z_distance = llFrand(1.0);
//move object to my avatar position with a slight offset
vector increment = <x_distance, y_distance, 0.0>;
vector newposition = avpos + increment;
llSetPos (newposition);
//back to start
llResetScript();
}
}