|
Antreas Alter
Registered User
Join date: 25 May 2008
Posts: 6
|
04-02-2009 10:24
been trying to do it myself for days ( dont laff  looks like i cant learn lsl lol ) Need a script that will do this: 1. after rez of prim, say to user to edit and rotate the prim, then when finished to touch the prim 2. after user ( finished with his editing and possible rotating ) touches the prim, script inside the prim gets current prim rotation ( x y z axis ) ( llgetrot ? ) 3. then llsetrot > set rotation of prim to x ( whatever x found to be previously ) , y ( whatever y found to be previously ) , z ( ignore what it was, value defined by me ) Of course need to be modify ( aka full perm ) coz i need to change the z part  Any help welcomed.. newbie in lsl as i said 
|
|
Osprey Therian
I want capslocklock
Join date: 6 Jul 2004
Posts: 5,049
|
04-02-2009 10:54
Products Wanted is that-a-way ;-D
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
04-02-2009 13:55
rotations can be a PITA for sure, so in the interest of helping you learn more lsl... (and because it's really simple as far as scripts go) default{ touch_start( integer vIntTotalTouches ){ llOwnerSay( (string)(llRot2Euler( llGetLocalRot() ) * RAD_TO_DEG) ); } }
that will tell the owner what the objects current rotation is in degrees, and should be equivalent to what's in the objects edit window. converting it back uses the following functions DEG_TO_RAD llEuler2Rot llSetLocalRot you can also change single elements in a vector (or a rotation) by adding .x .y or .z (or .s for the last part of a rotation) to the name of the variable like.. myVector.z = myFloat; my user page on the wiki ( http://wiki.secondlife.com/wiki/User:Void_Singer/Rotations? ) also contains some simpler explanations than the main wiki page, of how to do some common rotation tasks (and I just updated it, but I plan to add a few more tasks)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
04-02-2009 16:25
Which prim are you trying to edit? The prim doing the rezzing or the rezzed prim? Try stating again what exactly it is you are trying to accomplish and maybe we can point you in the right direction. If you are trying to adjust the item doing the rezzing so that next time it rezzes it's contents, they come out the right rotation then you could try looking at this script: http://wiki.secondlife.com/wiki/Multi_Item_RezzerIt has a function that lets you dynamically change and store the rezzed position offset. You should be able to adapt something like that to editing rotations also. From your post you have been trying to script it yourself which is great. You can also try posting what you have so far, even if it doesn't work yet. Put notations in the areas where you are confused.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|