Jump to content

wanted , I want to make a flashing neon sign using my own textures


greek Wingtips
 Share

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

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

Recommended Posts

I looking at making my own neon flashing signs, I think poss only two textures can be used but more the merrier,

I no nothing about scripting but understand a little about editing the script but thats about all.

 

any help on a script  or a ready made would be great.

 

thanks for the support

greek wingtips

Link to comment
Share on other sites

The way to do that is using one texture split into two or more separate pictures and use llSetTextureAnim() to shift between pictures.
If one picture is dark and the other is bright Fulbright setting gives a fabulous effect.
Here is a script you can use for a start:

integer mode;integer side = 0; // Prim face numberinteger x_frames = 2;integer y_frames = 3;float start = 0.0; // first framefloat length = 0.0; // number of frames, 0 is all framesfloat rate = 0.125;  // frames/Sdefault{    state_entry()    {        mode = ANIM_ON | LOOP;        llSetTextureAnim( mode, side, x_frames, y_frames, start, length, rate );    }}

You will need to change the variable values to fit your purpose
This is for a texture with 2 by 3 pictures and it shift pictures every 8 seconds

Note: When you have started your flashing neon sign you can remove the script and the flashing continues
This means you will put no load on the SIM

Link to comment
Share on other sites

you can do it with 1 texture and a flashing light script/script that turns full bright on/off or two textures and a texture switcher script which is what i have done i used a photo editor two create two textures with a neon sign style border one texture has a small neon border the other has a slightly brighter larger more filled neon border i used a texture switcher timer script set to 0.5secs between switching and set the prim to full bright 

Link to comment
Share on other sites

I'd use glow on a timer:

 

integer toggle;default{    state_entry()    {        llSetTimerEvent(3);    }    timer()    {        toggle=!toggle;         if(toggle) llSetPrimitiveParams([PRIM_GLOW, 0, 0.15]);         // the first zero after PRIM_GLOW indicates the top side. Change it        // to 1 - 5 to light up the other sides, or use ALL_SIDES instead.        else       llSetPrimitiveParams([PRIM_GLOW, 0, 0.0]);    }}

 

In case you need a texture to try it out:

free! neon sign.png

 

Link to comment
Share on other sites


Innula Zenovka wrote:

For what it's worth, using animated textures is far kinder to the sim than repeatedly changing stuff on a timer.

That's true. Several objects on a 1 second timer or faster can lag the hell out of a sim. That's why I wouldn't advise to go below 3 seconds if anybody uses the above script. Perhaps better make it 5-10 seconds, that'll still look realistic.

I mainly used a time for the freebie neon sign (made it for the freebie section in a friend's shop) because glow makes it more realistic, and the timer allows to add things like sound effects.

Link to comment
Share on other sites

  • 8 months later...

That could be done like this

// flashing sign with ON/OFF by Dora Gustafson, Studio Dora 2012integer mode;integer side = 0; // Prim face numberinteger x_frames = 2;integer y_frames = 2;float start = 0.0; // first framefloat length = 0.0; // number of frames, 0 is all framesfloat rate = 1.0;  // frames/Sinteger on = TRUE;default{    state_entry()    {        mode = ANIM_ON | LOOP;        llSetTextureAnim( mode, side, x_frames, y_frames, start, length, rate );    }    touch_start( integer num)    {        on = !on;        if (on) llSetTextureAnim( mode, side, x_frames, y_frames, start, length, rate );        else llSetTextureAnim( mode, side, x_frames, y_frames, start, 1.0, 1E-5 );    }}

 

Link to comment
Share on other sites

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