how to make it so that leaders don't start on keeps
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.
how to make it so that leaders don't start on keeps
Can anyone tell me how to make it so that leaders don't start on keeps? Using the map editor I cant figure it out.
please give your posts meaningful titles.
Old title was: How do you? ...
please give your posts meaningful titles.
Old title was: How do you? ...
Aramil
Leaders will always start on keeps. What you can do to make it look like they don't, is to change the terrain at their starting locations from keep to something else using the [terrain] tag in a prestart event, for example. So, if you're only drawing maps without writing a scenario, you're forced to always start on a keep.
If the starting location of player one is 10,2 and the starting location of player 2 is 17,19 and you'd want them both to start on grassland instead of a keep, you could do this:
Code: Select all
[event]
name=prestart
[terrain]
x,y=10,2
letter=g
[/terrain]
[terrain]
x,y=17,19
letter=g
[/terrain]
[/event]
If it appears more often that you don´t want a keep, you could make a general macro.
I used that too.
Code: Select all
#define RESETKEEP SIDE TERRAIN
[store_starting_location]
side={SIDE}
variable=keep
[/store_starting_location]
{VARIABLE_OP x format $keep.x}
{VARIABLE_OP y format $keep.y}
[terrain]
x=$x
y=$y
letter={TERRAIN}
[/terrain]
{CLEAR_VARIABLE keep}
{CLEAR_VARIABLE x}
{CLEAR_VARIABLE y}
#enddef
First read, then think. Read again, think again. And then post!
- Viliam
- Translator
- Posts: 1341
- Joined: January 30th, 2004, 11:07 am
- Location: Bratislava, Slovakia
- Contact:
The other way to do this -- if you want some keep, but you just want your leader to start somewhere else -- is move the leader in a "prestart" event. Like this:
Code: Select all
#define MOVEUNIT DESCRIPTION X Y
[store_unit]
[filter]
description={Description}
[/filter]
variable=move
kill=yes
[/store_unit]
[set_variable]
name=move.x
value={X}
[/set_variable]
[set_variable]
name=move.y
value={Y}
[/set_variable]
[unstore_unit]
variable=move
[/unstore_unit]
[clear_variable]
name=move
[/clear_variable]
#enddef
[event]
name=prestart
{MOVEUNIT MyLeader 51 60}
[/event]