Unit Marco?
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.
- DEATH_is_undead
- Posts: 960
- Joined: March 4th, 2007, 3:00 pm
- Location: Northern United States
Unit Marco?
I remember it done before, but how, I forgot. I remember at the end of the {}'s, the x,y was shown with a space instead of a coma. I looked through the Wiki, but couldn't find anything concerning it, though the day before i did. 2 hours looking back, I realized it must have been taken out. Someone please help me with this, it'd make my maps a lot easier...
Thanks,
DEATH (The_Unforgiven)
Thanks,
DEATH (The_Unforgiven)
3P MP Scenario - Great Dwarves Escape
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
Re: Unit Marco?
What?
- DEATH_is_undead
- Posts: 960
- Joined: March 4th, 2007, 3:00 pm
- Location: Northern United States
Re: Unit Marco?
.... I saw it before, {UNIT ID X Y} or something... I'm not sure.
3P MP Scenario - Great Dwarves Escape
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
Re: Unit Marco?
http://www.wesnoth.org/macro-reference.xhtml
That's all the macro documentation there is.
Macro parameters are space-separated.
In ordinary WML, stuff works like this:
but you can shorten that to:
that's not specific to x and y keys though, you can just as well do this:
That's all the macro documentation there is.
Macro parameters are space-separated.
In ordinary WML, stuff works like this:
Code: Select all
x=1
y=2
Code: Select all
x,y=1,2
Code: Select all
[unit]
type,description,user_description,x=Spearman,guywiththespear,_"weird name",1
hitpoints,y,side=28,2,1
[/unit]
- DEATH_is_undead
- Posts: 960
- Joined: March 4th, 2007, 3:00 pm
- Location: Northern United States
Re: Unit Marco?
Not what i meant, but close. It was, as i described, in {}'s... I believe it was F8_Binds that did it.
3P MP Scenario - Great Dwarves Escape
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
Re: Unit Marco?
That macro has endured massive changes during 1.3, currently, the macros you want to use are:
GENERIC_UNIT SIDE TYPE X Y
NOTRAIT_UNIT SIDE TYPE X Y
LOYAL_UNIT SIDE TYPE X Y ID_STRING NAME_STRING
they pretty much do what their name says, call them like this:
Parentheses are used to make the contents be seen as a single parameter rather than multiple.
GENERIC_UNIT SIDE TYPE X Y
NOTRAIT_UNIT SIDE TYPE X Y
LOYAL_UNIT SIDE TYPE X Y ID_STRING NAME_STRING
they pretty much do what their name says, call them like this:
Code: Select all
{GENERIC_UNIT 1 Spearman 23 19}
{LOYAL_UNIT 2 (Royal Guard) 3 38 lisarguard2 (_"Li'sar's Guard")}
- DEATH_is_undead
- Posts: 960
- Joined: March 4th, 2007, 3:00 pm
- Location: Northern United States
Re: Unit Marco?
Yes, thank you, now that i remember it more, i believe it was 1.2.4 that he showed me the map...
EDIT:
Whats the '2' after ,LOYAL_UNIT for?
EDIT:
Code: Select all
{LOYAL_UNIT 2 (ID OF UNIT) X Y (_"Monster")}
3P MP Scenario - Great Dwarves Escape
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
Re: Unit Marco?
Obviously the side.
- DEATH_is_undead
- Posts: 960
- Joined: March 4th, 2007, 3:00 pm
- Location: Northern United States
Re: Unit Marco?
Didn't think of that. Thanks.
3P MP Scenario - Great Dwarves Escape
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.