Page 1 of 1
Teamcolor and FX
Posted: 21 Nov 2006, 00:27
by Argh
A relatively small request... would it be possible to load up Teamcolor into a variable, and then use it in color commands for CustomExplosionGenerator? With such a thing, I could make new ways to display team affiliation for units in NanoBlobs, for example, without adding any gigantic code to Spring. I just want the RGB value stored as RGB, Alpha = 1.0 as default, so that I can do things like:
Code: Select all
colormap=TeamColor 1.0 1.0 1.0 1.0 1.0;
Which would cycle from TeamColor to white...
Posted: 21 Nov 2006, 00:32
by rattle
Or "TeamColour 1.0" to "0 0 0 0.01". Would make the team colour fade to the normal texture... this also needs a duration tag which describes the length of one cycle.
edit: Uh if it's only applied to the team colour channel then white would have the same effect actually...

Posted: 21 Nov 2006, 01:00
by Argh
If it's CustomExplosionGenerator code, then the cycle-time is the ratio of the frame-length. I.E., if your ExplosionGenerator runs 5 frames, and your code looks like this:
Code: Select all
colormap= TeamColor 1.0 TeamColor 1.0 TeamColor 1.0 0.0 0.0 0.0 0.01;
Then it would fade from TeamColor to RGB values 000 and Alpha 0.01 over a 2-frame period.
Posted: 21 Nov 2006, 01:41
by Argh
Nononono... we have a misunderstanding here. I don't want to change the TeamColor on models... that would be quite annoying.
I just want TeamColor to be a variable that gets stored and passed to CustomExplosionGenerator, so that I can, for example, call an ExplosionGenerator via a unit's script, and have that "explosion" use TeamColor.
There are a lot of possible uses. I just need the TeamColor value, which gets stored and passed around in Spring, to be accessible to CustomExplosionGenerators, in case we want to use it. Should be pretty trivial to code.
Sorry if the explanation doesn't help a lot, but meh... just trust me, if I could do this, I could do some really cool things...
Posted: 25 Nov 2006, 17:27
by rattle
Oh... lol. Yeah that would be pretty cool indeed, you could make frames which glow in team color and stuff like that. Hell even the muzzle flames could have (slight) team coloring...