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

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

Recommended Posts

Posted

Hi, I'm new to scripting and well, for some reason every script I write to make my fire flicker on the walls, works fine while I am editing the prim. As soon as I close the editor the flicker radius vanishes. Its probably something silly, but a little humility never scared me away. Any ideas?

No laughing..OK maybe a little :matte-motes-bashful-cute-2:

 

 

 

vector FIRST_COLOR = <1.00000, 0.50196, 0.00000>;

vector SECOND_COLOR = <1.00000, 0.52941, 0.05490>;

vector THIRD_COLOR = <1.00000, 0.63137, 0.25882>;

 

default {

state_entry() {

//

// all states will hear this timer until one of them

// stops it using llSetTimerEvent( 10.0 )

//

llSetTimerEvent(llFrand(0.5) + 0.25);

//

// start the color cycle

//

state first_color;

}

}

 

state first_color {

state_entry() {

llSetPrimitiveParams([PRIM_FULLBRIGHT,ALL_SIDES,FALSE,PRIM_POINT_LIGHT,TRUE,FIRST_COLOR,1.0,5.0,0.6]);

}

 

timer() {

state second_color;

}

}

 

state second_color {

state_entry() {

llSetPrimitiveParams([PRIM_FULLBRIGHT,ALL_SIDES,FALSE,PRIM_POINT_LIGHT,TRUE,SECOND_COLOR,0.9,5.0,0.6]);

}

 

timer() {

state third_color;

}

}

 

state third_color {

state_entry() {

llSetPrimitiveParams([PRIM_FULLBRIGHT,ALL_SIDES,FALSE,PRIM_POINT_LIGHT,TRUE,THIRD_COLOR,0.7,5.0,0.6]);

}

 

timer() {

state first_color;

}

}

 Aliens live in my carpet....

Posted

Thank you both for replying. Its definitely NOT elegant hehe, I just started to delve into scripting, but it is interesting and fun:-) It only works for me while I'm editing the prim containing it; as soon as I close the editor the effect stops. I know my browser supports the effect because I have seen it in a working object both on my own sim and off. However...now that the light source suggestion is out there, maybe that's where I need to be focusing yea?

 

Aliens live in my carpet....

Posted

No.  I doubt that the light source business has anything to do with it.  After all, the same light sources are there whether you are editing the script or not.  No, your script really does work fine here.  It's flashing away nicely.  It is rather subtle, though, and it's only adding light to things around it.  Perhaps you're just not looking carefully enough?  Try setting your suen to midnight.

BTW, how did you post your note in ultra tiny type just now?  I had to cut/paste it into a separate editor to read it.

Posted

I'll strive to create better scripts and yes I had the object close to a wall. Slingshot made me wonder about my graphics settings; as I could see the effect while editing...and sure enough that was my issue. I tweaked the quality and vwa-la..

Now I can see how choppy it is and hopefully improve it.....and I get to feel daft for an entirely new reason now:-D hehe.

Thanks so much to you both for helping me so quickly...greatly appreciated.

Posted

I've noticed that my viewer seems to change the

lighting depending on distance. I made a lightning flash

prim, and if you are close to it, it works fine, but if

you move away from the prim, the viewer renders the flashes

of lightning as a solid pulse of light....very odd...

You are about to reply to a thread that has been inactive for 4256 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...