My little macro for merman cages :P
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.
My little macro for merman cages :P
Here:
Code: Select all
#define MERMAN_CAGE DESC_ONE DESC_TWO DESC_THR TYP_ONE TYPE_TWO TYPE_THR X Y SIDE
{PLACE_IMAGE misc/cage.png ({X}) ({Y})}
{PLACE_IMAGE merman.png ({X}) ({Y})}
[event]
name=moveto
[/filter]
side={SIDE}
x,y={X},{Y}
[/filter]
[removeitem] [/removeitem]
[unit]
type={TYPE_ONE}
description={DESC_ONE}
x,y={X},{Y}
[/unit]
[unit]
type={TYPE_TWO}
description={DESC_TWO}
x,y={X},{Y}
[/unit]
[unit]
type={TYPE_THR}
description={DESC_THR}
x,y={X},{Y}
[/unit]
[/event]
#enddef
First read, then think. Read again, think again. And then post!
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
A filter? You can't filter a [removeitem]...Noyga wrote:You should add a filter inside your [removeitem] [/removeitem] because this will remove every objects (not just the cage).
If you use twice your macro, it will remove the two cages when you walk over a cage...
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
You mean it can be used twice at the same loc?Noyga wrote:You should add a filter inside your [removeitem] [/removeitem] because this will remove every objects (not just the cage).
If you use twice your macro, it will remove the two cages when you walk over a cage...
If yes, a variation wich generates one or two would be useful because you can combine to a large merman-cage event.
First read, then think. Read again, think again. And then post!
[removeitem] removes all objects at the x,y location.
If you want a multi-object event, you can place the new objects after the old objects are removed. You should also place a new moveto event inside the old moveto event, and the new event will be created when the old one is triggered.
If you want a multi-object event, you can place the new objects after the old objects are removed. You should also place a new moveto event inside the old moveto event, and the new event will be created when the old one is triggered.
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.
Stacking. However, we may not be talking about the same thing.toms wrote:You mean just stacking the events together or make macros for getting the mermen and combining them to the right number?
It was mainly joking, but it may find use.
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.
I think on
Code: Select all
[event]
(action)
[event]
(action)
[/event]
[/event]
and this confuses me. or do you mean it should be only a merman generator macro without the moveto event and then more of them can be in an event?
First read, then think. Read again, think again. And then post!
Man, I have no clue what you're talking about. While your macro does have an advantage in that it allows you to hardcode x,y values once, it has the disadvantage of hard-coding the number of mermen that come out of the cage and only allowing mermen to be in cages as opposed to other caged types of units. As a result, I personally would do it just the way we do it in Bay of Pearls. I only wanted to point out the incorrect syntax of [removeitem].
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.