A flashing light on the road to Damascus [SOLVED]

For collaboration on developing the mod capabilities of VS; request new features, report bugs, or suggest improvements

Moderator: Mod Contributor

Post Reply
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

A flashing light on the road to Damascus [SOLVED]

Post by chuck_starchaser »

I think I just got an idea inspired by the muses...

Flashing lights on stations (and large ships) could immensely benefit from a small parameter addition or two.

Well, to get lights that flash, there's typically two ways, right? One is to use two glow textures with an spr that alternates them; but this is rather inefficient in the use of the texture. The other is to have a separate mesh for a light, and have two glow textures for it, but these are small textures, so, less waste. The only problem remaining is that the lights would still all flash synchronously.

But with an extra parameter in spr files, or in .py file functions that call for spr's, could solve this probem: An optional boolean to indicate whether the starting time in the spr frequency should be randomized.

And yet another parameter could also add a random variation to the speed of spr sequencing.
Last edited by chuck_starchaser on Sun Mar 09, 2008 12:21 am, edited 1 time in total.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

That parameter is already here. I added it recently to help randomize the splash screens.

Good idea to put it on the blinkenlights... I never thought of that.

Actually, there's a chance it will be shared among all of the instances. So this might not work. But it's worth a try.

Specify the "startRandom" flag in the .ani files.
For an example, vegastrike's data4.x/animations/load_screen.ani/load_screen.ani has:

Code: Select all

.3 .3
5 20.0 startRandom
Jackal.png
FraternalWar.png
Shapers.png
Jackal.png
FraternalWar.png
The flags go after the number of frames and the time per frame.

I believe this same flags line occurs in animated .spr's as well, as long as you put it on the same line with the number of frames.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Unfortunately Speed changing is not possible, but with some copying and pasting blanks and duplicate items you can simulate this.

The reason it is hard to do is because it multiplies the number of frames by the time per frame.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

Ah, the speed is not important. I can just use all different but fixed speeds. Random starts are all that really matters. This is great! Thanks!
Post Reply