Teamcolor and FX

Teamcolor and FX

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Teamcolor and FX

Post 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...
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post 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... :oops:
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post 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...
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post 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...
Post Reply

Return to “Feature Requests”