|
Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
|
08-16-2008 08:03
I am using this script to rez prims from invisable prims at various locations and rotations. Using a chat call to rez them in a specific sequence. I am trying to get the script to rez the item at a 0,0,0 rotation, basically to rez the enclosed item at the same horozontal rotation as the prim. But it always rezzes the prims at the same rotation irregardless to the scripted prim's own rotation. I know its some stupid small variable somewhere, but I dug through the rotation in the wiki and my head started to spin, lol So what am I forgetting here, I am clueless, thanks. default { state_entry() { llSetStatus(STATUS_PHANTOM, TRUE); llListen(666333, "", NULL_KEY, "" ); } on_rez(integer num) { llResetScript(); } listen(integer number, string name, key id, string message) { if(message=="tower1"  { llRezObject("tower1", llGetPos() + <0, 0, 1.2>, ZERO_VECTOR, ZERO_ROTATION, 0); } }}
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
08-16-2008 09:44
You are rezzing the new object at ZERO_ROTATION relative to the sim. Try rezzing it at llGetRot(). This returns the rotation of the rezzing prim, so the object will be the same as the rezzer.
If I am wrong (might be, a little rusty) lots of people will correct me.
_____________________
So many monkeys, so little Shakespeare.
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
08-16-2008 09:51
If you want to make the rezzed prim have the same rotation as its rezzer, you should use llGetRot() instead of ZERO_ROTATION.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
08-16-2008 09:59
If you also want that offset from the rezzing prim's position to be relative, you'll want to multiply it by the prim's rotation. So your call will look more like: llRezObject("tower1", llGetPos() + <0, 0, 1.2>*llGetRot(), ZERO_VECTOR, llGetRot(), 0);
|
|
Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
|
08-16-2008 10:03
thanks so much to you all, I figured it out 
|