Jump to content
You are about to reply to a thread that has been inactive for 673 days.

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

Recommended Posts

Posted

Hi guys!

Below my script that flashes an object on all faces.
What do I do to choose, in my case, only face 3 of the object?

**************************************

default
{
state_entry()
{
llSetTimerEvent(0.5);//here we set the timer in seconds.
}
timer()//what happens when the timer runs
{
llSetColor(<0,0,0>, ALL_SIDES);//first colour to show on all sides
llSleep(0.25);//here the script sleeps for half a sec then colour changes to second colour.
llSetColor(<1,1,1>, ALL_SIDES);//second colour to show
}
}

************************************
 

  • 2 years later...
Posted (edited)

I would like to set 4 faces, around the rim, so when I taper it, its like a picture frame and like the colors to change around like this.  what is the coding for that.  I tried 1,2.  It doesnt work and 1:2  and 1;2

etc etc

Edited by Anne Zapedzki
Posted (edited)

You'll have to call llSetColor four times, once for each individual face. 

You could also consider using llSetLinkPrimitiveParamsFast, where this can be done with a single function call (albeit with quite a few items in the list parameter).

(Or call llSetColor once for ALL_SIDES, and then twice more to change the front and back faces to what they ought to be.)

Edited by KT Kingsley
  • Like 1
Posted
20 minutes ago, Anne Zapedzki said:

I would like to set 4 faces, around the rim, so when I taper it, its like a picture frame and like the colors to change around like this.  what is the coding for that.  I tried 1,2.  It doesnt work and 1:2  and 1;2

etc etc

You can figure out which faces have which numbers by setting "Select Face" in the Build Tool, shift-touching the face(s) of interest, and hitting Ctrl-Alt-Shift-T.

One way of carving up a prim for a 4-faced tapered picture frame results in those faces being 1, 2, 3, and 4. You can set them in four separate llSetColor function calls, or you can do all four in one fell swoop:

default
{
    state_entry()
    {
        vector frameColor = <1.0, 0.5, 0.0>;
        llSetLinkPrimitiveParamsFast(LINK_THIS, 
            [ PRIM_COLOR, 1, frameColor, 1.0
            , PRIM_COLOR, 2, frameColor, 1.0
            , PRIM_COLOR, 3, frameColor, 1.0
            , PRIM_COLOR, 4, frameColor, 1.0
            ]);
    }
}

 

  • Like 2
You are about to reply to a thread that has been inactive for 673 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
×
×
  • Create New...