|
ivan Supply
llPleaseDoNotCamp();
Join date: 30 Nov 2006
Posts: 246
|
09-01-2007 18:54
okey i will try to explain what i need on this way imagine that u have a wall, door and door handle...all linked so, if i open a door and a door handle will follow a door but...the wall will stay  i cant do that ...im trying more then 2 hours...read forum, wiki...asking in world...but without result i know there is a way -so what i need....one object wich will be on hes place...second who will rotate on touch and 3th who will been atached on second  and follow second rotation - and i dont make a door  ) i have many door scripts...and i try to modify it for..but still nothing...i just cant figure it out... tnx for any tip
|
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
09-01-2007 18:56
You have to rotate the door relative to the current rotation of the wall, look up llSetLocalRot() and llGetLocalRot() in the wiki to find the solution to your problem
|
|
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
|
09-01-2007 19:39
The door handle is gonna give you trouble if it, the door, and the wall are all linked. You'll have to find the position of the handle relative to the door's hinge, take that and rotate it and change its position too. And do your best tackling the problem of making both the door and the handle move at the same time. If possible, I think having the door/handle not linked to the wall is the best thing to do.
|
|
ivan Supply
llPleaseDoNotCamp();
Join date: 30 Nov 2006
Posts: 246
|
09-01-2007 22:28
ok i have this for now ..  integer OPEN = FALSE; integer DIRECTION = -2; Open() { if(!OPEN) { OPEN = TRUE; llMessageLinked(LINK_ALL_OTHERS, 0, "Open", NULL_KEY); llSetRot(llEuler2Rot(<0, 0, -DIRECTION * PI/3>) * llGetRot()); llSetTimerEvent(15); } }
Close() { if(OPEN) { OPEN = FALSE; llMessageLinked(LINK_ALL_OTHERS, 0, "Close", NULL_KEY); llSetRot(llEuler2Rot(<0, 0, DIRECTION * PI/3>) * llGetRot()); llSetTimerEvent(0); } }
default { touch_start(integer num) { if(!OPEN) { Open(); } else { Close(); } } timer() { if(OPEN) { Close(); } } link_message(integer prim, integer num, string msg, key id) { if(msg == "Open") { Open(); } else if(msg == "Close") { Close(); } } }
but it works fine somehow..until i move root prim...when i do that ...(&*^()*&% i know there is something with lleuler2rot but dont know what to do ... btw script is not mine i just modify it with that lleuler2rot lines
|
|
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
|
09-01-2007 22:51
I tried that in an unlinked door and it worked well. B = 0.375 & E = = 0.875 . X = .1, y = 3, z = 3. Not sure how it would work in a linked door. You would need to link the door handle bits to this door and then it must be the root prim.
|