Jump to content

? Did I do some thing wrong


portkeywizzard
 Share

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

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

Recommended Posts

Never have had this happen to me, not sure if I did this right or not. This is my code and its seems to work up till the point of Move area. Kinda lost on why this fails. Any tips?

 

vector offset = <0,0,1>;
float hi_end_fixed = FALSE; 
float min = 0.01;
integer ns = 10;

Boot()
{
    list Prams = llGetLinkPrimitiveParams(2, [PRIM_SIZE]);
    offset *= ((1.0 - min) / ns) * (offset * llList2Vector(Prams,0));
    hi_end_fixed -= 0.5;
}

Move()
{
    integer i;
    list Prams = llGetLinkPrimitiveParams(2, [PRIM_SIZE, PRIM_POSITION, PRIM_ROT_LOCAL]);
    vector scale = llList2Vector(Prams,0);
    vector pos = llList2Vector(Prams,1);
    rotation rot = llList2Rot(Prams,2);
    do llSetLinkPrimitiveParams(2, [PRIM_SIZE, scale - offset, PRIM_POSITION, pos + ((hi_end_fixed * offset) * rot)]);
    while ((++i) < ns);           
    offset = - offset;    
}

Link to comment
Share on other sites

I assume things start after Boot is executed.

offset is set to z-size minus minimal z-size divided by the number of animation steps - in an overly complicated way.
hi_end_fixed is -0.5 - unnecessary if you set that in the variable definition

Now the Move

you set a new scale by using offset and move the prim by half offset to keep the position

But you do 10 times the same thing so not much to see here.

You want to change offset between the loops
offset = -offset at the end will not work then - if you change offset - so you want to use a local copy of offset instead of global-offset

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1221 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...