arrow.lslp 910 B

123456789101112131415161718192021222324252627282930313233
  1. sloodle_set_pos(vector target_position){
  2. integer counter=0;
  3. while ((llVecDist(llGetPos(), target_position) > 0.001)&&(counter<50)) {
  4. counter+=1;
  5. llSetPos(target_position);
  6. }
  7. }
  8. default {
  9. state_entry() {
  10. llListen(-27, "", "", "");
  11. }
  12. listen(integer channel, string name, key id, string message) {
  13. list data = llParseString2List(message, ["|"], []);
  14. //go|v0|"+(string)v0
  15. string command = llList2String(data,0);
  16. string my_name = llGetObjectName();
  17. string object = llList2String(data,1);
  18. vector target_position=llList2Vector(data, 2);
  19. if (command=="go"){
  20. if (my_name ==object){
  21. llOwnerSay("My name is :"+my_name +" my target is: "+(string)target_position+" Going now!");
  22. sloodle_set_pos(target_position);
  23. }
  24. }
  25. }
  26. }