Jump to content

Need help with a simple auto rez script


Branesergen
 Share

You are about to reply to a thread that has been inactive for 1220 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I have looked everywhere and all the scripts I bought and have tried to modify have failed. Reading scripts is like reading Greek to me (American lol)

I just want a simple script that will auto rez an item and allow me to set the rotation of said item. I sell breedables and I want to be able to load up a prim and when someone buys and takes the current one another one will rez and rotate to 0,90,90.

Link to comment
Share on other sites

llEuler2Rot with adjustment of degrees to radians is your friendly helper there. And we need to take into account the rotation of our rezzer, so something like this:

llRezObject( "MyItem",  llGetPos() + <1.5,  0.0, 0.0>,  ZERO_VECTOR,  llEuler2Rot(<0, 90, 90>*DEG_TO_RAD)*llGetRot(), 0);

Try and make a box with different colors on each side. Put the box into a box, where you use the code below into a touch event and observe, how the rezzed boxes spin around. Seeing in this case most pedagogical.

    touch_start(integer total_number)
    {
        integer i;
        for (i=1;i<=4; i++)
        {
            llRezObject("Object",
            llGetPos() + <1.5*i, 0.0, 0.5*i>,
            ZERO_VECTOR,
            llEuler2Rot(<0, 45*i, 45*i>*DEG_TO_RAD)*llGetRot(),
            0);
        }
    }

Edited by Rachel1206
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1220 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...