Custom team colour
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Custom team colour
Hi.
I'm trying to create the custom colour yellow for my campaign. In team-colours.cfg, I have this:
And in my scenario code, I have this. (example)
The actual colour shows up in the units ellipse, but not in the mini-map in the top right corner. Anyone know what I'm doing wrong?
I'm trying to create the custom colour yellow for my campaign. In team-colours.cfg, I have this:
Code: Select all
#define __COLOUR_RANGE _CR_ID _CR_RGB_R _CR_NAME
[color_range]
id={_CR_ID}
rgb={_CR_RGB_R}
name={_CR_NAME}
[/color_range]
#enddef
#define COLOUR_YELLOW
EEE000,FFFFFF,100F00,FFF000#enddef
#define CUSTOM_COLOUR_RANGE
{__COLOUR_RANGE yellow ({COLOR_YELLOW}) ( _ "Yellow")}
#enddef
Code: Select all
[side]
side=10
colour={COLOUR_YELLOW}
no_leader=yes
team_name=foes
user_team_name= _ "team_name^Foes"
[/side]
-
- Moderator Emeritus
- Posts: 2232
- Joined: March 26th, 2004, 10:58 pm
- Location: New York, New York
Re: Custom team colour
I'm no WML wizard myself, but if you do manage to get a Yellow team colour working, would you mind if I borrowed your code for my campaign? I have a faction for which it seems the most appropriate team colour.
"Pure logic is the ruin of the spirit." - Antoine de Saint-Exupéry
Re: Custom team colour
Sure. The colour does actually work, just what I meant was that in the mini-map it shows up as red.
Re: Custom team colour
Well, are you actually using that [color_range] as a top-level tag? You never tell whether you use your CUSTOM_COLOUR_RANGE macro anywhere or not.
Re: Custom team colour
Uh, I actually had no idea what I was doing. I just copied it from Invasion from the Unknowns team-colour cfg file. What should I actually do?