Map Labels
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.
Map Labels
I'm pretty new to WML, and I'm wondering how to add Labels to certain tiles on my map. Thanks.
-
- Posts: 245
- Joined: November 28th, 2006, 12:42 am
-
- Posts: 202
- Joined: March 26th, 2007, 5:38 am
- Location: Wesmere
If you mean "How do I display a map?" Here's your answer:
becomes
[map]agaggfsgasgasg
asgsdgsadgsagsgsfg
sagasdglkdlksh
ghaqlshgdafhg[/map]
Code: Select all
[map]agaggfsgasgasg
asgsdgsadgsagsgsfg
sagasdglkdlksh
ghaqlshgdafhg[/map]
[map]agaggfsgasgasg
asgsdgsadgsagsgsfg
sagasdglkdlksh
ghaqlshgdafhg[/map]
- Viliam
- Translator
- Posts: 1341
- Joined: January 30th, 2004, 11:07 am
- Location: Bratislava, Slovakia
- Contact:
Yes. Map is one file, scenario CFG is another file. (The map is included from scenario CFG.) You write WML tags into scenario file. Something like this:
Map file:
Scenario file:
Map file:
Code: Select all
agaggfsgasgasg
asgsdgsadgsagsgsfg
sagasdglkdlksh
ghaqlshgdafhg
Code: Select all
[scenario]
map_data={map file}
[label]
x=20
y=30
text="The Dark Portal"
[/label]
[/scenario]
With the exception that the scenario file is not "like that".Viliam wrote:Yes. Map is one file, scenario CFG is another file. (The map is included from scenario CFG.) You write WML tags into scenario file. Something like this:
Map file:Scenario file:Code: Select all
agaggfsgasgasg asgsdgsadgsagsgsfg sagasdglkdlksh ghaqlshgdafhg
Code: Select all
[scenario] map_data={map file} [label] x=20 y=30 text="The Dark Portal" [/label] [/scenario]
- Viliam
- Translator
- Posts: 1341
- Joined: January 30th, 2004, 11:07 am
- Location: Bratislava, Slovakia
- Contact:
OK, this is a better example: (based on 2p_Blitz.cfg)
Code: Select all
[multiplayer]
id=my_scenario
name= _ "2p - My Scenario"
description= _ "My multiplayer scenario. Recommended setting of 2 gold per village."
map_data="{maps/multiplayer/my_map}"
{DEFAULT_SCHEDULE}
{DEFAULT_MUSIC_PLAYLIST}
[side]
[ai]
villages_per_scout=8
[/ai]
side=1
canrecruit=1
controller=human
team_name=north
user_team_name= _ "teamname^North"
fog=yes
[/side]
[side]
[ai]
villages_per_scout=8
[/ai]
side=2
canrecruit=1
controller=human
team_name=south
user_team_name= _ "teamname^South"
fog=yes
[/side]
[label]
x=20
y=30
text="The Dark Portal"
[/label]
[/multiplayer]