|
Bartiloux Desmoulins
Think Kink? Think Bart!
Join date: 27 Sep 2005
Posts: 121
|
11-23-2006 09:31
I have a two-object build. The second objects move back and forth along the first based on commands it receives via listen events. My problem is this. In the on_rez event, I am recording the second objects coords and rotation so that subsequent movement can be based on relative position to the starting point. The thing is, when I pull the whole thing from inventory it rezzes about a meter off the ground and has to be editted and pulled back down to the ground. Because the second object rezzes with the first, the second object records it's position at the point where it was rezzed, not at the new, lower position. I know scripts can rez objects but the placement of the second object is crucial in relation to the first. What can I do to make sure that when pulled from inventory and then moved around, or when moved around and moved around some more, the second object gets "refreshed" with its no "home base" position? I am ever so close to having this build done, except for this one pesky issue. Any guidance would be greatly appreciated!! Bartiloux
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
11-23-2006 09:37
If your second object moves relative to the first based on listen commands, then it should never be a problem whether or not the first is moved. When you tell the second object where to move along the first, just tell it in all 3 relative dimensions to the first, so it properly reorients itself in any situation.
|
|
Bartiloux Desmoulins
Think Kink? Think Bart!
Join date: 27 Sep 2005
Posts: 121
|
11-23-2006 10:03
But it's movement relative to the first is the position that was "recorded" when the object first rezzed, not at its new position.
|
|
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
|
11-23-2006 10:13
Have it record it's position on the state entry instead of the on rez....then all you have to do is reset it.
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
11-24-2006 00:55
I'd suggest adding code to the BASE prim. Add rez and move event handlers that can then either kill and rerez the secondary prim or send updated 'home' coordinates.
|
|
Bartiloux Desmoulins
Think Kink? Think Bart!
Join date: 27 Sep 2005
Posts: 121
|
Thank you!
11-24-2006 08:33
That idea makes sense. Could I impose on you to include a scripting "snip-it" so that I might better understand how to use these two events and code accordingly? Thank you, again! -Bartiloux
|