Changing a team's color?

The place to post your WML questions and answers.

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.
Post Reply
RaustBD
Posts: 262
Joined: May 29th, 2010, 8:11 pm

Changing a team's color?

Post by RaustBD »

Is there a way to change a team's color in a campaign without changing their side? I want the enemy to be the red team and the heroes to be either blue or black (2 or 6?), but I don't want the enemy to go before the player due to side order issues.
User avatar
beetlenaut
Developer
Posts: 2814
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Changing a team's color?

Post by beetlenaut »

Use color= in the [side] tag.
From the wiki: "color: May be either a numeric color index or a color name (e.g. 'blue', 'purple', 'orange', etc.). The numeric form is deprecated. The default list of numbers and corresponding colors can be found in data/core/team_colors.cfg."
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
User avatar
WhiteWolf
Forum Moderator
Posts: 769
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: Changing a team's color?

Post by WhiteWolf »

If you use 1.10.x, then you can modify colors only at the beginning of a scenario: only use a new one. F.e, in map9, team 1's color was red, and you want to change it to green, then map10's code should look like:

Code: Select all

[scenario]
......wml....
[side]
    side=1
    color=green
    ....wml....
[/side]
....wm....
[/scenario]
This will change the color of the side.
But, you cannot modify color on the spot, during a game.

If you use 1.11.x, you can always use [modify_side] to modify a side's color at any moment you wish.

WhiteWolf
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Post Reply