Jump to content

.


Evan Reanimator
 Share

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

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

Recommended Posts

float R = 0;float G = 0;float B = 0;

default{    state_entry()    {        llSay(0, "Hello, Avatar!");    }
    touch_start(integer total_number) {
R = llFrand(1);G = llFrand(1);B = llFrand(1);        // change color!        llSetColor(<R,G,B>,ALL_SIDES);                llSetPrimitiveParams([PRIM_POINT_LIGHT,TRUE,<R,G,B>,1,20,0.75]);
    }
}

 

This changes the color and light color to a ... random color upon every touching.

Hope it helps. Feel free to ask if a particular effect is needed.

 

BTW you may want to set a Glow parameter to about 0.4-0.6 and turn on Full Bright, cause the object without those effects looks very dull.

Link to comment
Share on other sites

if you are looking to define the colors as static, then you want a list wrapper...

the simplest list wrapper is a global integer that each time you make your call, you add 1, then modulus by the list length, and save the result back to the global

gIdxColor = (-~gIdxColor) % color_list_length; //-- wraps the list index back to zero when it reaches the end of the list

Link to comment
Share on other sites

no learning without exposure, but I'll count that as a questions so...

gIdxColor = (gIdxColor + 1) % list_length;

 

~Y =  (Y +1) * -1
-1 * ~Y = (Y + 1) * -1 *-1
-~Y = (Y + 1) * (1)
-~Y = Y + 1

 

-Y = (Y * -1)
~(-Y) = ((Y * -1) + 1) * -1
~-Y = (-Y + 1) * -1
~-Y = (-Y * -1) + (1 * -1)
~-Y = Y - 1

 

X = 1
-~X = 2
~-X = 0

 

Link to comment
Share on other sites

I don't know, Paladin.  I think it all depends on the new scripter.  When I was just starting, I lurked here for quite a while before finally asking Void how one of her bit flip thingees worked.  It was fascinating. I remember taking apart a bunch of freebie scripts and trying to rewrite them with Void's syntax to see if I understood correctly.  It was a great exercise, and I learned a lot about things other than bit flipping in the process.  I know I'm a little wierd --- as interested in the puzzle as in the solution --- but there have to be other scripters like me .... I hope.

Link to comment
Share on other sites

What would that be?

 

Also I have a movie screen that I want to just loop with a quick clip of something, could anyone point me to a tutorial or script that I could achieve this with? and what format can the clip be? Like does it have to be a .GIF or can it be .MP4?

Link to comment
Share on other sites


Rolig Loon wrote:

I don't know, Paladin.  I think it all depends on the new scripter.

Absolutely, and I didn't mean to sound snarky. And Void's response was not only very kind, but interesting. As a non-flipper, I appreciated it. Maybe both types of answers would be appropriate, since it's hard to know how much experience the poster has.

I work in a very high-level language where that kind of thing isn't required, so my eyes glaze when I see it. Human nature being what it is, I assume everyone in the world is like me. :)

Link to comment
Share on other sites

using the method of storing the uuid or names of inventory items in a list that I outlined above, you'd just replace the color function with the texture function.

using a single texture with multiple images in it, you'd change the offsets identically as you do for the color swatch version.

Link to comment
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...