Jump to content

Can this be done? Police Light


OddbroShillings
 Share

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

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

Recommended Posts

Hello, Im looking for a script for a police car light bar. I was wondering if its possible to make the light bar have specific patterns, like you would see on the road. what Im trying to say is that I dont want some old random flashing lights that arnt in sync, if ANYONE can help me with this that would be most appreciated. Ask me any questions because I dont think I gave enough detail, Thanks in advance.

Link to comment
Share on other sites

You could probably use llSetTextureAnim with a texture in which ON/OFF frames are arranged to cycle in an interesting and repeatable pattern: ON-ON-OFF-OFF-OFF-OFF-ON-OFF-OFF-ON-ON-ON-OFF ..............  You wouldn't have to mess with the rate or anything.

Link to comment
Share on other sites

Depends where this will be used.  If really "on the road" then yeah: texture anim (and maybe bling -- interesting idea) should be enough.  But in, say, an urban build, the point of having the cop car around at all is mostly for how it illuminates the stuff around it, and that's going to require PRIM_POINT_LIGHT flipping on and off -- an object update per change, plus some viewer-side heavy lifting.

With Viewer 2 projected texture lighting, it's possible to get the effect without the object updates (indeed, without an active script at all) by projecting the light source through an animated texture filter.  That, however, entails even more work, viewer-side (and is currently invisible to the vast majority).

Link to comment
Share on other sites

if you use  llSetLinkTextureAnim  with a special texture ( normally the same texture with the same rate ) with transparence , and different levels of grey , no colors;

and if you use llSetLinkPrimitiveParamsFast for each of your prim  to set them with a different color ;

should it be like you expect ?

Link to comment
Share on other sites

Begin in the LSL wiki.  Read the function descriptions and study any sample scripts.  Play with them.  For your project, you'll want to look at llSetTextureAnim if you try doing it by shifting textures, and at llSetLinkPrimitiveParamsFast or maybe just llSetLinkColor if you want to set the light color by altering the prims directly.

Link to comment
Share on other sites

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

×
×
  • Create New...