Jump to content

VirtualKitten

Resident
  • Posts

    916
  • Joined

  • Last visited

Everything posted by VirtualKitten

  1. Yes thankyou I spotted that It oddly did not work as its list but think I resolved it . I put a lot of error trapping in it yesterday as it was not returning avatar key but -1 this was doing other things.:) Moving other links around. I have not run it with multiseat yet . list p_new_seat=[]; //should give array of keys integer ig=llGetNumberOfPrims(); integer to=ig; for(;ig--;) p_new_seat= p_new_seat + llAvatarOnLinkSitTarget(llList2Integer(new_seats,(to-ig-1))); integer n = llListFindList(llList2List(p_new_seat,0,5),[agent]); integer m = llListFindList(new_seats,[n]); if ( m <6 && m!=-1) { // detect if in bottom five seats. seat ="bottom"; SEATS_data = llJsonSetValue(SEATS_data,["seat"+(string) i,"loc"],seat); if(find_anyone_up_or_down( agent,"top") == NULL_KEY) { llUnSit(agent); llSay(0, "There are other forest folk comming down the rope please wait for them before climbing the rope , then please try again."); return; } } {HUGS} D:)
  2. I agree it should return a list of keys but it not returning anything in the list .
  3. HI according to LSL there was a control character in the initial seat lower 4 however now have them all now, however I am using list p_new_seat=[]; integer ig=llGetNumberOfPrims(); integer to=ig; for(;ig--;) { llOwnerSay("Seat:"+(string)(to-ig)); p_new_seat + llAvatarOnLinkSitTarget(llList2Integer(new_seats,(to-ig))); } To determine if seat is used it provides no entries can anyone explain why this is not working please? I also registering all rope = 1; llSetLinkPrimitiveParamsFast(rope,[ PRIM_SIT_TARGET, FALSE, ZERO_VECTOR,ZERO_ROTATION ]); integer ih= 6; for(;ih--;) { new_seats = new_seats + check_for_prim("bottom_seat#"+(string)(6-ih-1)); llLinkSitTarget(_llObtainLinkFromName("bottom_seat#"+(string)(6-ih-1)),llList2Vector(seats_pos_bottom,(6-ih-1)),ZERO_ROTATION); } ih= 6; for(;ih--;) { new_seats = new_seats + check_for_prim("top_seat#"+(string)(6-ih-1)); llLinkSitTarget(_llObtainLinkFromName("top_seat#"+(string)(6-ih-1)),llList2Vector(seats_pos_top,(6-ih-1)),ZERO_ROTATION); } llOwnerSay("Seats:"+llDumpList2String(new_seats,",")); As you can see from output, [09:52] VK [6 seats]: Resetting [09:52] VK [6 seats]: Seats:6,8,9,7,5,4,11,13,14,12,10,2 The program 2nd code snippet at post 1 only gives back : [09:53] VK [6 seats]: Hello, !3|5|6|9|10|11|14 Why are these different? {Hugs! } D
  4. Yes they are all Convext hull mesh as below seats [07:47] VK seats: Resetting [07:47] VK seats: line:top_seat#0 [07:47] VK seats: line:top_seat#1 [07:47] VK seats: line:top_seat#2 [07:47] VK seats: line:top_seat#3 [07:47] VK seats: line:top_seat#4 [07:47] VK seats: line:top_seat#5 [07:47] VK seats: line:top_seat#0 [07:47] VK seats: line:top_seat#1 [07:47] VK seats: line:top_seat#2 [07:47] VK seats: line:top_seat#3 [07:47] VK seats: line:top_seat#4 [07:47] VK seats: line:top_seat#5
  5. Why is this only registering six seats please? rope = 1; llSetLinkPrimitiveParamsFast(rope,[ PRIM_SIT_TARGET, FALSE, ZERO_VECTOR,ZERO_ROTATION ]); integer ih= 6; for(;ih--;) { // llOwnerSay("line:"+(string)"top_seat#"+(string)(6-ih-1)); new_seats = new_seats + check_for_prim("bottom_seat#"+(string)(6-ih-1)); new_seats_key = new_seats_key + llName2Key("bottom_seat#"+(string)(6-ih-1)); llLinkSitTarget(_llObtainLinkFromName("bottom_seat#"+(string)(6-ih-1)),llList2Vector(seats_pos_bottom,(num_seats-ih)),ZERO_ROTATION); } ih= 6; for(;ih--;) { // llOwnerSay("line:"+(string)"top_seat#"+(string)(6-ih-1)); new_seats = new_seats + check_for_prim("top_seat#"+(string)(6-ih-1)); new_seats_key = new_seats_key + llName2Key("bottom_seat#"+(string)(6-ih-1)); llLinkSitTarget(_llObtainLinkFromName("top_seat#"+(string)(6-ih-1)),llList2Vector(seats_pos_top,(num_seats-ih)),ZERO_ROTATION); } When I use the second script on the first posts i get by clicking it i only get six seats any ideas please? [07:39] VK seats: LData:0|<0.000000, 0.000000, 0.000000>|<0.000000, 0.000000, 0.000000, 1.000000>|0|<0.000000, 0.000000, 0.000000>|<0.000000, 0.000000, 0.000000, 1.000000>|1|<-0.200000, 0.000000, 0.010000>|<0.000000, 0.000000, 0.000000, 1.000000>|0|<0.000000, 0.000000, 0.000000>|<0.000000, 0.000000, 0.000000, 1.000000>|1|<-0.200000, 0.000000, 0.050000>|<0.000000, 0.000000, 0.000000, 1.000000>|1|<0.000000, 0.000000, 0.050000>|<0.000000, 0.000000, 0.000000, 1.000000>|0|<0.000000, 0.000000, 0.000000>|<0.000000, 0.000000, 0.000000, 1.000000>|0|<0.000000, 0.000000, 0.000000>|<0.000000, 0.000000, 0.000000, 1.000000>|1|<-0.200000, 0.000000, 0.010000>|<0.000000, 0.000000, 0.000000, 1.000000>|1|<-0.200000, 0.000000, 0.050000>|<0.000000, 0.000000, 0.000000, 1.000000>|1|<-0.200000, 0.000000, 0.050000>|<0.000000, 0.000000, 0.000000, 1.000000>|0|<0.000000, 0.000000, 0.000000>|<0.000000, 0.000000, 0.000000, 1.000000>|0|<0.000000, 0.000000, 0.000000>|<0.000000, 0.000000, 0.000000, 1.000000>|0|<0.000000, 0.000000, 0.000000>|<0.000000, 0.00000 [07:39] VK seats: Hello, !3|5|6|9|10|11
  6. Hi everyone I am having Mesh curve problems importing after changing name do i have to change the group of vectors to the same is why i keep getting this silly error? BezierCurve.05 mesh are part of MeshCurve - Walkway bot L or R or is this a long name issue which SL cant cope with ? Hugs D
  7. This is getting worse i made six seats at each end 12 in total SL only recognizes seven 7? but have got it finding ten now had enough for today have fun
  8. Quintess I am using list seats_pos_bottom = [<-0.20,0.0,0.01>,"key",<-0.20,0.0,0.5>,"key",<-0.20,0.0,1.0>,"key",<-0.20,0.0,1.5>,"key",<0.00,0.0,0.05>,"key"]; list seats_pos_top= [<-0.20,0.0,0.01>,"key",<-0.20,0.0,0.5>,"key",<-0.20,0.0,1.0>,"key",<-0.20,0.0,1.5>,"key",<-0.20,0.0,0.05>,"key"]; Got the same crappy message as before
  9. So basically I am now wasting 20 land impact instead of three
  10. I have a huge sit area Quistess Alpha thank you for joining us its dimensions t each end are 3m long x 0.38587 x 0.38587 Hugs D
  11. I think the only way to do this is to create eight extra prims one for each seat which is really wasteful . Hugs D
  12. I tried default { state_entry() { integer num_seats = 3; list seats_pos_bottom = [<-0.20,0.0,0.01>,"key",<-0.20,0.0,0.05>,"key",<-0.20,0.0,0.09>,"key",<-0.20,0.0,0.13>,"key",<0.00,0.0,0.05>,"key"]; list seats_pos_top= [<-0.20,0.0,0.01>,"key",<-0.20,0.0,0.05>,"key",<-0.20,0.0,0.09>,"key",<-0.20,0.0,0.13>,"key",<-0.20,0.0,0.05>,"key"]; integer ic = num_seats; for(;ic--;) { llLinkSitTarget(bottom_seat,llList2Vector(seats_pos_bottom,(num_seats-ic)),ZERO_ROTATION); } ic = num_seats; for(;ic--;) { llLinkSitTarget(top_seat,llList2Vector(seats_pos_top,(num_seats-ic)),ZERO_ROTATION); } But got the usual crappy SL statement "No room to sit here, Try another spot" Sighs this doesn't even allow it to have one sit Hugs D
  13. I am wondering if I have to create the seats first as it wont do it on the fly
  14. then how do 1 prim seats work please note this My script still does not create extra seat . if(llAvatarOnLinkSitTarget(bottom_seat)== agent) { seat ="bottom"; SEATS_data = llJsonSetValue(SEATS_data,["seat"+(string) i,"loc"],seat); // PRIM_SIT_TARGET returns a list. [integer status, vector pos, rotation rot]. quaternion v = (quaternion)llList2String( llGetLinkPrimitiveParams(j, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET]),1); SEATS_data = llJsonSetValue(SEATS_data,["seat"+(string) i,"vloc"],(string)v); quaternion current_seat =(quaternion) llList2String( llGetLinkPrimitiveParams(bottom_seat, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET]),1); //llOwnerSay("current_seat:"+(string)current_seat); llSetLinkPrimitiveParamsFast(bottom_seat,[ PRIM_SIT_TARGET, TRUE,_getFreeSeat(seats_pos_bottom,agent),(quaternion)current_seat ]); if(find_anyone_up_or_down( agent,"top") == NULL_KEY) { llUnSit(agent); llSay(0, "There are other forest folk comming down the rope please wait for them before climbing the rope , then please try again."); return; } } Hugs D
  15. Well its still not finding the next seat at the bottom and only finds top one with two on it te second seat does not appear to be created stangely Hugs D
  16. What does tis mean I so had to turn this off which didnt work if (perm & PERMISSION_CONTROL_CAMERA) { /*llClearCameraParams(); // reset camera to default llSetCameraParams([ CAMERA_FOCUS_LOCKED, TRUE, // (TRUE or FALSE) CAMERA_POSITION, <0,0,0>, // region relative position CAMERA_ACTIVE, TRUE, // 1 is active, 0 is inactive CAMERA_BEHINDNESS_ANGLE, 30.0, // (0 to 180) degrees CAMERA_BEHINDNESS_LAG, 0.0, // (0 to 3) seconds CAMERA_DISTANCE, 10.0, // ( 0.5 to 10) meters //CAMERA_FOCUS, <0,0,5>, // region relative position CAMERA_FOCUS_LAG, 0.05 , // (0 to 3) seconds CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE) CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters CAMERA_PITCH, 10.0, // (-45 to 80) degrees CAMERA_POSITION, <0,0,0>, // region relative position CAMERA_POSITION_LAG, 0.0, // (0 to 3) seconds CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE) CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters CAMERA_FOCUS_OFFSET, <2.0, 2.0, 0.0> // <-10,-10,-10> to <10,10,10> meters ]); */
  17. Thank molly i now have this if(llAvatarOnLinkSitTarget(bottom_seat)== agent) { seat ="bottom"; SEATS_data = llJsonSetValue(SEATS_data,["seat"+(string) i,"loc"],seat); quaternion v = (quaternion)llList2String( llGetLinkPrimitiveParams(j, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET]),0); SEATS_data = llJsonSetValue(SEATS_data,["seat"+(string) i,"vloc"],(string)v); quaternion current_seat =(quaternion) llList2String( llGetLinkPrimitiveParams(bottom_seat, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET]),0); llOwnerSay("current_seat:"+(string)current_seat); llSetLinkPrimitiveParamsFast(bottom_seat,[ PRIM_SIT_TARGET, TRUE,_getFreeSeat(seats_pos_bottom,agent),(quaternion)current_seat ]); list climb = find_anyone_up_or_down( agent); if(llGetListLength(climb)!=0) { llUnSit(agent); llSay(0, "There are other forest folk comming down the rope please wait for them before climbing the rope , then please try again."); return; } } else { seat="top"; SEATS_data = llJsonSetValue(SEATS_data,["seat"+(string) i,"loc"],seat); quaternion v = (quaternion)llList2String( llGetLinkPrimitiveParams(j, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET]),0); SEATS_data = llJsonSetValue(SEATS_data,["seat"+(string) i,"vloc"],(string)v); quaternion current_seat =(quaternion) llList2String( llGetLinkPrimitiveParams(bottom_seat, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET]),0); llOwnerSay("current_seat:"+(string)current_seat); llSetLinkPrimitiveParamsFast(bottom_seat,[ PRIM_SIT_TARGET, TRUE,_getFreeSeat(seats_pos_bottom,agent),(quaternion)current_seat ]); list climb = find_anyone_up_or_down( agent); if(llGetListLength(climb)!=0) { llUnSit(agent); llSay(0, "There are other forest folk comming up the rope please wait for them before descending the rope , then please try again."); return; } }
  18. Molly thank you for your help . I saw that too . The main problem was the quaternion I was expecting vector I am going to print it and have more detailed look. I did notice one of the other prims was moving. So I added an extra key check' 'llObtainLinkFromKey(l_key); but have not had time to test it yesterday. My textures were got back something had cleared their settings but it all good now . I did have a major script crash in week . I wonder if it was that .This is what I have? at present I still don't know why my avatar animation position has now moved and is 0.5m out .its hard coded for some reason I could not upload mesh yesterday. I am hoping that is just secondlife update. Just to be clear this is a multi-seat using JSON which I tested as far as one seat before it gave errors on two and more this was because of the non release of seat, when the seat was not free, despite it being disabled when my stuff took over. I am having to implement more seat handling to create an extra seat when first avatar sits to ensure that a new seat is available as I said above and track them in my seat JSON handler. Its a lot ore complicated to track. Hugs D.
  19. j is fin Molly , thank you for joining us integer j = llGetNumberOfPrims()-1; was better if(llAvatarOnLinkSitTarget(bottom_seat)== agent) { seat ="bottom"; SEATS_data = llJsonSetValue(SEATS_data,["seat"+(string) i,"loc"],seat); quaternion v = (quaternion)llList2String( llGetLinkPrimitiveParams(j, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET]),0); SEATS_data = llJsonSetValue(SEATS_data,["seat"+(string) i,"vloc"],(string)v); quaternion current_seat =(quaternion) llList2String( llGetLinkPrimitiveParams(bottom_seat, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET]),0); llOwnerSay("current_seat:"+(string)current_seat); llSetLinkPrimitiveParamsFast(bottom_seat,[ PRIM_SIT_TARGET, TRUE,_getFreeSeat(seats_pos_bottom,agent),(quaternion)current_seat ]); }
  20. Well I tried the following if(llAvatarOnLinkSitTarget(bottom_seat)== agent) { seat ="bottom"; SEATS_data = llJsonSetValue(SEATS_data,["seat"+(string) i,"loc"],seat); string v = llList2String( llGetLinkPrimitiveParams(j, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET]),0); llOwnerSay("************************* v:" +(string)llGetLinkPrimitiveParams(j, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET])); //SEATS_data = llJsonSetValue(SEATS_data,["seat"+(string) i,"vloc"],(string)v); vector current_seat = llList2Vector( llGetLinkPrimitiveParams(j, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET]),0); llSetLinkPrimitiveParamsFast(bottom_seat,[ PRIM_SIT_TARGET, TRUE,_getFreeSeat(seats_pos_bottom,agent),<0.0, 0.0, 0.0, 1.0> ]); } Disabling SEATS_data above , to see what was being put into it. This is what (string)llGetLinkPrimitiveParams(j, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET])); had in it as I was climbing which is odd all 0's and not my seat vector [03:30] VK seat: ************************* v:1<0.000000, 0.000000, 0.010000><0.000000, 0.000000, 0.000000, 1.000000>01<0.000000, 0.000000, 0.010000><0.000000, 0.000000, 0.000000, 1.000000> Further more even more oddly the second seat does not get set up I ran my scripts second one on original post and it reported [03:31] VK seat: LData:0|<0.000000, 0.000000, 0.000000>|<0.000000, 0.000000, 0.000000, 1.000000>|0|<0.000000, 0.000000, 0.000000>|<0.000000, 0.000000, 0.000000, 1.000000>|1|<0.000000, 0.000000, 0.000000>|<0.000000, 0.000000, 0.000000, 1.000000>|1|<0.000000, 0.000000, 0.010000>|<0.000000, 0.000000, 0.000000, 1.000000>|0|<0.000000, 0.000000, 0.000000>|<0.000000, 0.000000, 0.000000, 1.000000> [03:31] VK with 1 seat: Hello, !3|4 Clearly I expected three seats. What is going wrong ? Hugs D
  21. Sorry arton I thought I explained that ., Its a multi eat animated rope . I had a frustrating time yesterday all my textures in my model setting vanished and my script crashed which has done something funny to avatar positions placing them 0.5 of the rope . which I haven't solved it was all working in a previous 1 seat version so I have to work out what's changed the scripts snippits should work but am wondering if its getting a linden seat at all now as its falling into my error trap codes for not returning seat keys. Hugs
  22. I thought this might be better to store the seat in the table I already have and then get a new seat from other list vector _getFreeSeat(list seats_pos_bottom, key agent) { integer e = llListFindList(llList2ListStrided(seats_pos_bottom,2,20,2),["key"]); if(e != -1){ // Found empty slot in e return llList2Vector(llList2ListStrided(seats_pos_bottom,2,20,2),e); } return ZERO_VECTOR; } list _removeseat(list l_seats ,key agent) { integer e = llListFindList(llList2ListStrided(l_seats,2,20,2),["key"]); if(e!=-1) { return llListReplaceList(l_seats,["key"],e,e); } return []; } list seats_pos_bottom = [<0.00,0.0,0.01>,"key",<0.00,0.0,0.02>,"key",<0.00,0.0,0.03>,"key",<0.00,0.0,0.04>,"key",<0.00,0.0,0.05>,"key"]; if(llAvatarOnLinkSitTarget(bottom_seat)== agent) { SEATS_data = llJsonSetValue(SEATS_data,["seat"+(string) i,"loc"],"bottom"); SEATS_data = llJsonSetValue(SEATS_data,["seat"+(string) i,"vloc"],(string)llList2Vector( llGetLinkPrimitiveParams(j, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET]),0)); vector current_seat = llList2Vector( llGetLinkPrimitiveParams(j, [PRIM_SIT_TARGET,j, PRIM_SIT_TARGET]),0); llSetLinkPrimitiveParamsFast(bottom_seat,[ PRIM_SIT_TARGET, TRUE,_getFreeSeat(seats_pos_bottom,agent),<0.0, 0.0, 0.0, 1.0> ]); And to clear it with a system call to clear this when clear to a key when got up that way a new set is created after first seat .
  23. That wont work ta a multiseat what is returned in above PRIM_SIT_TARGET is it a vector
×
×
  • Create New...