Multiple Units of the Same Name
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.
-
- Posts: 127
- Joined: October 25th, 2005, 9:32 pm
Multiple Units of the Same Name
Is it possible to have multiple units of the same name? If so, how can I do it?
In summation, you're wrong.
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
yes.
[unit]
type=Elvish Fighter
x=2
y=2
side=2
[/unit]
[unit]
type=Elvish Fighter
x=2
y=2
side=2
[/unit]
and voila! two units with the same (empty) name!
[unit]
type=Elvish Fighter
x=2
y=2
side=2
[/unit]
[unit]
type=Elvish Fighter
x=2
y=2
side=2
[/unit]
and voila! two units with the same (empty) name!
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.
or you could try.
because user_description is the name as it appears, so as long as they have different descriptions (the bit you don't see) then you should be fine.
Code: Select all
[unit]
type=Elvish Fighter
description=andy1
user_description=andy
x=2
y=2
side=2
[/unit]
[unit]
type=Elvish Fighter
description=andy2
user_description=andy
x=2
y=2
side=2
[/unit]
Or you could just do
Descriptions do not have to be unique. (However, I don't know what will happen if you try to have a message with description=andy. It probably won't work. So, if you want two characters with the same name, you should do what ranger m said. However, if all you want is a generic name, like "conscript", to give to a bunch of created units, mine will work.)
Code: Select all
[unit]
type=Elvish Fighter
description=andy
x=2
y=2
side=2
[/unit]
[unit]
type=Elvish Fighter
description=andy
x=2
y=2
side=2
[/unit]
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
it will - it uses the one to the top left.turin wrote:However, I don't know what will happen if you try to have a message with description=andy. It probably won't work.
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.
-
- Posts: 127
- Joined: October 25th, 2005, 9:32 pm
-
- Posts: 127
- Joined: October 25th, 2005, 9:32 pm