portkeywizzard Posted February 3, 2020 Share Posted February 3, 2020 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 More sharing options...
Mollymews Posted February 3, 2020 Share Posted February 3, 2020 1 hour ago, portkeywizzard said: vector offset = <0,0,1>; float hi_end_fixed = FALSE; llSetLinkPrimitiveParams(2, [PRIM_SIZE, scale - offset, PRIM_POSITION, pos + ((hi_end_fixed * offset) * rot)]); hi_end_fixed = FALSE = 0 0 * <0,0,1> = <0,0,0> Link to comment Share on other sites More sharing options...
Nova Convair Posted February 3, 2020 Share Posted February 3, 2020 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 More sharing options...
Recommended Posts
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