Jump to content

Daniells Brandi

Resident
  • Posts

    38
  • Joined

  • Last visited

Everything posted by Daniells Brandi

  1. mollymeus, your code is perfect, I did the test and saw that it does not work on physical objects. It would have some code like this for physical object. I need a seaplane to level (align) at height determined by user. I was working with 'VEHICLE_ANGULAR_MOTOR_DIRECTION' but the plane keeps going up or down even when the value set to 0, it makes the plane oscillate all the time, I need more precision I'm out of ideas.
  2. yes, but I would like for example to rotate 10 degrees up, but without changing the direction of the prim. ///////////////////////////////////////////////////////////////////////// vector vOffset2 = <1,0,0> * llGetRot(); vector noY = <llVecMag(<vOffset2.x, vOffset2.y, 0.0>), 0.0, vOffset2.z>; integer pitch = llRound(llAtan2(noY.z, noY.x) * RAD_TO_DEG); ///////////////////////////////////////////////////////////////////////// would be the reverse process of this code. This code gives me the pitch, but I want the object to have a pitch set by me
  3. I have a problem rotating a prim, I found some examples, but in the example, explain to rotate the prim in one of the 3 axes. I need the prim to rotate (up or down) always in front. The front would be the coordinate E on the world map and zero rotation on first rez. Thanks
  4. I think I could, in fact I just needed to multiply by -1. float angle = llAtan2(my_pos.x*-1,my_pos.y*-1) * RAD_TO_DEG; thanks again for the support.
  5. Hello Innula Zenovka, I appreciate your help, but I still do not understand what I should do, I will try to illustrate better .. I have a fixed point on the world map, this point I already have. Example vector fix_point = <305310.70000, 234906.70000, 27.44904> indicated by the Red Point the image I only need x and y. I have my position on the world map using llGetRegionCorner()+llGetPos(); In real time. indicated by the Blue Point the image I have a compass that indicates my rotation in the world 80 ° in the picture I need to know, which direction (which angle ?° relative to the compass) I must take to get to this fixed point. In the example image, I know that I must take the 235 ° direction to get to the fixed point, but how to find the direction in the virtual world? (remembering that I will be moving, so this direction will not be fixed) I tried to use your formula, but I was unsuccessful, it really seems to be very difficult to work with angles. A second image as an example, I'm in another place in the world.... thanking for the help.
  6. I want to know what angle I should follow to get to the fixed point, so I can align the angle of the compass with the angle I have to go to get to the fixed point.
  7. Thanks for the help Mollymews. It seems a little difficult for me, so far I have a compass and managed to find the angle that I find myself in the world in relation to the fixed point. But what I need is to know which angle to follow to get to the fixed point. vector fix_point = <305310.70000, 234906.70000, 20>; //any position in the world default { state_entry() { llSetTimerEvent(0.1); } timer() { ///////////////////////////////////////////////////////////////////// //////////////// RELATION TO FIXED POINT ///////////////////////////// vector my_pos = (llGetRegionCorner()+llGetPos()); my_pos = my_pos - fix_point; float angle = llAtan2(my_pos.x,my_pos.y) * RAD_TO_DEG; if(angle < 0.0) angle += 360.0; angle * DEG_TO_RAD; ///////////////////////////////////////////////////////////////////// //////////////// COMPASS //////////////////////////////////////////// rotation currRot=llGetRot(); vector currEuler=llRot2Euler(currRot); float zRotAngle=currEuler.z; float heading=PI_BY_TWO-zRotAngle; while (heading<0) heading+=TWO_PI; heading=heading*RAD_TO_DEG; ///////////////////////////////////////////////////////////////////////// llSetText("Angle" + (string)angle + "° |" + "Compass=" + (string)heading + "°",<1,1,1>, TRUE ); ]); } }
  8. Angle relative to a fixed point in the world Hello, is it possible for me to find out which angle to follow to get to a fixed point in the world? Something like the image below ..
  9. Hello guys, I need a quick cleanup of this string in http_response.. {"dat":[{"length":37,"rid":"pro.ts","text":["I just want this part of the string"]}]} I take only the part in bold thank you for help.
  10. problem with camera ended a vehicle (plane) that uses only one configuration of dynamic camera but an error always happens almost always when exchanging island (when I go to a continent) was passed with a vehicle with a little rotation (bow making) the camera back to the correct position, but whenever we step from one island to another with the vehicle in a straight line, the camera is screwed (prey) and not the avatar back to the correct position, being sometimes even reversed (the correct position would be behind the avatar) I tried several changes, one of which was to update the camera whenever change, but still not got success. could someone help me? thanks
  11. You can help me? I'm new to this script and the rotation is very difficult (
  12. I could not do the same rotation that posted in the first post with this script. the object always rotate on only 1 axis
  13. I could not do the same rotation that posted in the first post with this script. the object always rotate on only 1 axis
  14. thank for help LepreLhaun but it works in vehicle?
  15. hello guys, I need help with this script, make the rotation happens smoothly. (with steps) vector r_open = <170.0, 76.0, 143.0>; vector r_close = <0.0, 90.0, 90.0>; rotation LocalRot(rotation localrot) { rotation LocRot = localrot / ( (ZERO_ROTATION / llGetLocalRot()) * llGetRot()); return LocRot; } OPEN() { llSetPrimitiveParams([PRIM_ROTATION, LocalRot(llEuler2Rot(r_open * DEG_TO_RAD))]); } CLOSE() { llSetPrimitiveParams([PRIM_ROTATION, LocalRot(llEuler2Rot(r_close* DEG_TO_RAD))]); } thanks!
  16. I have a script type of carrier aviation, works perfect, but I would aidiconar a move would make the plane turn in the air (when squeezed or D key) without losing direction. rotate the image in the green direction keep the red direction (forward and back) the image. thanks
  17. thanks Rolig Loon, but even I put the person's name in the notecard, it can not issue another notecard inside the object, ever seen this in alguins objects has 2 notecard notecard1 (acess list) You put the list of names that can edit another notecard2
  18. how can I make a list of people (one notecard) who have permission to edit a notecard (two notecard)contained in my object? researched a lot about it and did not find anything ty
  19. is, perfect thanks for help innula and Dora and sorry my english
  20. Dora did, I'll try to do it the way you explained "Then just toss out the list elements that don't have colons in them." but how can I do this?
  21. Dora, I got this way .. list alphabet = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"," "];string message = "20:15 event_one|21:12 new_event|23:55 Hello all";default{ state_entry() { list my_list = []; string convertedtext; integer i; for(i == 0; i < llStringLength(llToLower(message)); ++ i) { if(llListFindList(alphabet,[llGetSubString(llToLower(message),i,i)]) == -1) { convertedtext = convertedtext + llGetSubString(llToLower(message),i,i); } } my_list = llParseString2List(convertedtext,["|","_","-"],[]); llOwnerSay(llList2CSV(my_list)); }}
  22. Sorry dora, I am new to scripting, still learning I am posting a complete example of what I wanted, the string will always get this format, but will not be fixed.. default { touch_start(integer total_number) { string exemple = "20:15 event_one|21:12 new_event|23:55 Hello all"; list mylist = llParseString2List(exemple, [":","|"], []); // llOwnerSay(llList2CSV(mylist)); integer i = llGetListLength( mylist ); while ( i-- ) if ( llList2String( mylist, i) != (string)llList2Integer( mylist, i)) mylist = llDeleteSubList( mylist, i, i); llOwnerSay(llList2CSV(mylist)); -> result is 20,21,23 but e need 2015,2112,2355 or 20:15,21:12,23:55 } } and next result.. llOwnerSay(llList2CSV(mylist)); -> "event_one,new_event,Hello all"; (delet all numbers) thank you for help.
  23. thanks dora, is work now, but it would be possible so a result.. mylist == ["123","2015","9988","9","325698"] and not mylist == [123201599889325698]
  24. string exemple = "abc 123 2015 blue 9988 hello 9 zxcvbnm string list 325698 second life"; string p = llToLower(exemple); list mylist = llParseString2List( p, ["a,b,c,d,e,f,g,h,i,j,l,m,n,o,p,q,r,s,t,u,v,x,z,y,w,k"], []); I had already tried this way but does not work, is not a fixed string, so I need all the letters in llParseString2List..
×
×
  • Create New...