On 2009/4/8, Eric S. Raymond:
> While working on DM, I am discovering that it is really annoying not
> to be able to do things like this:
>
> #define LEADER_AND_FOLLOWER X Y
>    [unit]
>        id=Leader
>        ..
>        x,y={X},{Y}
>    [/unit}
>    [unit]
>        id=Follower1
>        ..
>        x,y={X},{Y}+1
>    [/unit}
>    [unit]
>        id=Follower2
>        ..
>        x,y={X}+1,{Y}-1
>    [/unit}
> #enddef

I would just like to point that, if you are using an event (e.g. the
prestart one if the units have to be there right from the start), you
could use Lua to achieve this:

function leader_and_follower(x,y)
  W.unit { id="Leader", .., x=x, y=y }
  W.unit { id="Follower1", .., x=x, y=y+1 }
  W.unit { id="Follower2", .., x=x+1, y=y-1 }
end

Best regards,

Guillaume

_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev

Reply via email to