09-04-2008 12:34
Using the script below for a prim that rezzes a different object each time it is clicked. this works just fine when the rezzer prim is set at 0,0,0, but, when the rezzer box is rotated the rezzed object does not align to it correctly anymore. It moves right, left or back and forth (however the rotation seems fine). I'm pretty baffled at this. anybody have an idea?


integer x = 0;//tells the script to start at the first item in the list, "0" is the first item
default
{
link_message( integer sender, integer num, string message, key id )//listen for message from other links
{
if( num == 0 )//what do to if the "next" button is pressed
{
llWhisper(5,"die";); //tells the currently displayed object to go away, change the channel it whispers on for each table, so they don't kill objects on other tables
llSleep(0.25);//gives it time to go away
integer obj = llGetInventoryNumber(INVENTORY_OBJECT);//checks how many objects are in the list
llRezObject(llGetInventoryName(INVENTORY_OBJECT, x), llGetPos()+<1.0,-0.1,.6>*llGetRot(),<0,0,0>,llGetRot(),0);
x++;//tells it to rezz the next one in the list
if (x == obj) x = 0;//if you were at the last one in the list, start over at the beginning
}

}
}
_____________________
Visit Bartlett & Nielsen furniture - two full sims of elegant furniture, prefab homes and more. Plus, Virgin Isle Marina - sl's largest luxury yacht and boat marina.