wesnoth/data/core/macros/teleport-utils.cfg
2007-05-16 01:04:29 +00:00

42 lines
798 B
INI

# Macros for teleporting units.
# These don't depend on any other macros. Please don't change this.
# ! in comments is used in generating HTML documentation, ignore it otherwise.
#define TELEPORT_UNIT FILTER NEWX NEWY
# Teleports a unit matching FILTER to NEWX,NEWY
#
# For example, teleport player 3's leader to 4,5
#! {TELEPORT_UNIT (
#! side=3
#! canrecruit=1
#! ) 4 5}
[teleport]
[filter]
{FILTER}
[/filter]
x={NEWX}
y={NEWY}
[/teleport]
[redraw]
[/redraw]
#enddef
#define TELEPORT_TILE OLDX OLDY NEWX NEWY
# Teleports a unit on tile OLDX,OLDY to NEWX,NEWY
#
# For example, teleport any unit thats currently on 1,1 to 4,5
#! {TELEPORT_TILE 1 1 4 5}
[teleport]
[filter]
x={OLDX}
y={OLDY}
[/filter]
x={NEWX}
y={NEWY}
[/teleport]
[redraw]
[/redraw]
#enddef