Lolita Erin Posted July 16, 2017 Share Posted July 16, 2017 Hello, i have seach but no luck, i need to be able to find in all the links prims the rotation, to fix it in case is move if i have 80 prims linked and some of them the rotation has move i like to seach in all the links which are the one are move so i can fix it (maybe with same script will be great) here is and example of 4 prims and one is move rotation, i need to be able to find using a script https://gyazo.com/638f6598a614dd3d070e78b8ef613d7f Thanks so much for any help Link to comment Share on other sites More sharing options...
Rolig Loon Posted July 16, 2017 Share Posted July 16, 2017 The function you want is llGetLinkPrimitiveParams Link to comment Share on other sites More sharing options...
Lolita Erin Posted July 16, 2017 Author Share Posted July 16, 2017 yes i found that but for some reason i can get the rotation like the image https://gyazo.com/d3ecbb2b0771eb388c5fa26a26437e0a z=39 degrees i need some sample script thanks so much Link to comment Share on other sites More sharing options...
Xiija Posted July 16, 2017 Share Posted July 16, 2017 here is an idea of what you might do? list rot_list; check_prims() { rot_list = []; integer prims=llGetNumberOfPrims(); integer x; for(x = 1; x <= prims;++x) { key link_key = llGetLinkKey(x); list temp = llGetLinkPrimitiveParams(x,[ PRIM_ROT_LOCAL ] ); rotation r = llList2Rot( temp,0); rot_list += link_key; rot_list += r; } } compare_lists(); { // make a function to compare list elements, and return TRUE or FALSE } reset_rotations() { // make a function to reset all rotations } list start_rotations; list chk_rotations; default { state_entry() { check_prims(); start_rotations = rot_list; } touch_start(integer total_number) { check_prims(); chk_rotations = rot_list; integer status = compare_lists(); if( status ) llOwnerSay("rotations correct"); else reset_rotations(); } } 1 Link to comment Share on other sites More sharing options...
Lolita Erin Posted July 17, 2017 Author Share Posted July 17, 2017 thanks i will try this thanks again! Link to comment Share on other sites More sharing options...
Lolita Erin Posted July 17, 2017 Author Share Posted July 17, 2017 The check_prims() return this and not in Degres how can i conver this? thanks Hello, Avatar! [18:46] Object: Link # 1 Rotation: <0.00000, 0.00000, 0.00000, 1.00000> [18:46] Object: Link # 2 Rotation: <0.00000, 0.00000, 0.00000, 1.00000> [18:46] Object: Link # 3 Rotation: <0.00000, 0.00000, 0.33381, 0.94264> [18:46] Object: Link # 4 Rotation: <0.00000, 0.00000, 0.00000, 1.00000> Link to comment Share on other sites More sharing options...
Xiija Posted July 17, 2017 Share Posted July 17, 2017 (edited) vector euler = llRot2Euler( some_rot ); // change rotation to vector euler *= RAD_TO_DEG;// change vector to degrees http://wiki.secondlife.com/wiki/LlRot2Euler Edited July 17, 2017 by Xiija Link to comment Share on other sites More sharing options...
Lolita Erin Posted July 18, 2017 Author Share Posted July 18, 2017 thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now