As I'm very new to scripting, I was wondering if anyone could help me indicate a very basic way to write a script that cycles images. That is to say, that it looks like the same image but flashing, like a neon.
I'd appreciate every su¡ggestion!

These forums are CLOSED. Please visit the new forums HERE
Wrestling with a cylce texture script |
|
|
Billyboy Cortes
Registered User
Join date: 2 Jun 2007
Posts: 3
|
08-21-2007 03:42
Hi everyone,
As I'm very new to scripting, I was wondering if anyone could help me indicate a very basic way to write a script that cycles images. That is to say, that it looks like the same image but flashing, like a neon. I'd appreciate every su¡ggestion! ![]() |
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
08-21-2007 11:38
Well...you'll want to have a light-on, light-off + an llSetAlpha probably...
...if you were to do a pure neon...you could either llSetPrimitiveParams(lighting stuff on) + llSetAlpha(1.0,ALL_SIDES) OR llSetPrimitiveParams(lighting stuff on) + llSetColor(color,ALL_SIDES); Corresponding with an llSetPrimitiveParams(lighting stuff off) + alpha invis or color black You'll probably want to just run a sleep rather than a timer to cause change in a script this simple. _____________________
--AeonVox--
Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music. |
|
Core Taurog
Registered User
Join date: 2 May 2007
Posts: 17
|
08-21-2007 11:49
You could also look at llSetTextureAnim - you'd probably want to use the "LOOP" setting - your texture would be, for example, a 2x2 arrangement (or 4x1 or 1x4 or whatever) with the light:
off/half-lit/full on/half-lit then use llSetTextureAnim(LOOP|ANIM_ON, <SIDE>, 2, 2, 0, 0, <rate> ;<SIDE> would be ALL_SIDES, or 0 or whatever rate is the frequency in frames per sec You could also play around with scale/ping-pong for some interesting effects (e.g. scale it up and down 10% each way, with bright letters - making it look like it's blinking from low light to high light). regards, Core |