Jump to content
Sign in to follow this  
VeranniCakes

looking for a scripter to help with simple code

Recommended Posts

Ok so I have two objects. both of them light up at different times, but I want them to change colors, how do I get them to change colors?

Here's a video of what I have

Here's my code so far

integer iON;

default
{
    state_entry()
    {
        llSetTimerEvent(3.0);
       
llSetLinkPrimitiveParamsFast(LINK_SET,[34,2,PRIM_FULLBRIGHT, ALL_SIDES, iON, PRIM_GLOW, ALL_SIDES, 0.05*iON,
            34,1,PRIM_FULLBRIGHT, ALL_SIDES, !iON, PRIM_GLOW, ALL_SIDES, 0.05*!iON]);

    }

    timer()
    {
        iON = !iON;
         llSetLinkPrimitiveParamsFast(LINK_SET,[34,2,PRIM_FULLBRIGHT, ALL_SIDES, iON, PRIM_GLOW, ALL_SIDES, 0.05*iON,
            34,1,PRIM_FULLBRIGHT, ALL_SIDES, !iON, PRIM_GLOW, ALL_SIDES, 0.05*!iON]);
    }
}

Share this post


Link to post
Share on other sites

Right now, all you're doing is setting FULL_BRIGHT and GLOW.

Check out PRIM_COLOR for prim color.  Check out PRIM_POINT_LIGHT for light emission color. 

Detailed info can be found here:  http://wiki.secondlife.com/wiki/LlSetLinkPrimitiveParams#llSetLinkPrimitiveParams

Also, I suggest using PRIM_LINK_TARGET instead of 34 in your statements, it's much easier to read.

 

 

 

Edited by Yingzi Xue

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...