## Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

# Discussion: jelly prims

Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
05-14-2006 23:58
I made this one evening for the primworx show and tell, its just a big glop of loops

CODE
`// Jelly Vectors // 2006 CFDT / Osgeld barmy// Made for show and tell :) // Feel free to grab whatever// If the code is presented in its unmodified version please give credit :) // !! To use just drop in a prim, you might have to move it up alittle, then touch it !! integer x;     //  place in loops integer c;     //  count of routinevector  s;     //  vector scale float   f;       //   float value for alpha fade fade_in() {f = 0.0; for (x = 0; x <= 9;++x) {(f = f + 0.1);llSetAlpha(f,ALL_SIDES);}}fadeout() {f = 1.0; for (x = 0; x <= 9;++x) {(f = f -  0.1);llSetAlpha(f,ALL_SIDES);}}vct_snk(){    for (x = 1; x <= 10; ++x)    {        s.x += 0.05;        s.y += 0.05;        s.z -= 0.099;        llSetScale(s);    }    vct_exp();}vct_exp(){    for (x = 1; x <= 10; ++x)    {        s.x -= 0.05;        s.y -= 0.05;        s.z += 0.099;        llSetScale(s);        vct_gig();      }     vct_gig_2();  }vct_gig(){    s.x += 0.2;    s.y += 0.2;    s.z -= 0.2;    llSetScale(s);    s.x -= 0.2;    s.y -= 0.2;    s.z += 0.2;    llSetScale(s);}vct_gig_2(){    for (x = 1; x <= 10; ++x)    {        s.x += 0.2;        s.y += 0.2;        s.z -= 0.2;        llSetScale(s);        s.x -= 0.2;        s.y -= 0.2;        s.z += 0.2;        llSetScale(s);    }        for (x = 1; x <= 10; ++x)    {        s.x += 0.1;        s.y += 0.1;        s.z -= 0.1;        llSetScale(s);        s.x -= 0.1;        s.y -= 0.1;        s.z += 0.1;        llSetScale(s);    }        for (x = 1; x <= 10; ++x)    {        s.x += 0.005;        s.y += 0.005;        s.z -= 0.005;        llSetScale(s);        s.x -= 0.005;        s.y -= 0.005;        s.z += 0.005;        llSetScale(s);    }    ++c;    get_place();}get_place(){    if (c == 0 || c == 1 ||c == 2) vct_snk();    else if (c == 3)    {         fadeout();        llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_BOX,         0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <0.0, 0.0, 0.0>, <0.0, 0.0, 0.0>]);        llSetColor(<1,0,0>,ALL_SIDES);        fade_in();        vct_snk();            }    else if (c == 4 || c == 5) vct_snk();    else if (c == 6)    {         fadeout();        llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SPHERE,         0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <0.0, 1.0, 0.0>]);        llSetColor(<0,0.501,1>,ALL_SIDES);        llScaleTexture(3.0,4.0,ALL_SIDES);        fade_in();        vct_snk();            }    else if (c == 7 || c == 8) vct_snk();     else if (c == 9)    {         s = <0,0,0>;        fadeout();        llResetScript();           }   }default{    on_rez(integer rez){fadeout(); llResetScript();}    state_entry()    {        s = <1,1,1>;        llSetPrimitiveParams([PRIM_FULLBRIGHT,ALL_SIDES,TRUE]);         llSetTexture("26262c36-4980-5299-64fc-8e735394cb33",ALL_SIDES);        llSetScale(s);        llTargetOmega(<0,0,0.2>,TWO_PI,1);        llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_BOX,         0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>]);        llSetColor(<0,1,0.501>,ALL_SIDES);        llScaleTexture(2.0,2.0,ALL_SIDES);        fade_in();    }    touch_start(integer total_number)    {vct_snk();}}`