how can I make names for a specific unit type?
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.
Re: how can I make names for a specific unit type?
Are you sure? Cause I just tested, andnobody5 wrote:Nay, it has to be Horseman, otherwise nothing happens, except when a Knight advances.
Code: Select all
[event]
name=post_advance
first_time_only=no
[filter]
type=Knight
[/filter]
{VARIABLE unit.name "Sir $unit.name"}
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
[/event]
So doing it this way makes more sense... the type=Horseman has advanced and is a type=Knight, and only then does the event trigger. Also, as mentioned, it works. This is also handy, since you don't have to deal with Lancers.Wiki wrote:post advance
Triggers just after the primary unit has advanced to another unit.
Also, the advance bug makes sense, sort of. Unstore_unit has an advance key. It defaults to true and tries to advance the unit if it has enough xp. So if you unstore a unit that has full experience, Wesnoth tries to advance it. Then, oh look, a unit is advancing! Trigger the advance event, which unstores the unit and advances it, which triggers the advance event, which...
Oddly, setting advance=false crashes Wesnoth.
Re: how can I make names for a specific unit type?
