Creating a unit in the middle of a round

The place to post your WML questions and answers.

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.
Post Reply
Stupidbro
Posts: 22
Joined: March 5th, 2019, 12:08 am

Creating a unit in the middle of a round

Post by Stupidbro »

So, in a scenario I'm building, there's a spot where I want a unit to be built on an event instead of the beginning, and I want him to specifically target the player's leader, if possible.
monochromatic
Posts: 1549
Joined: June 18th, 2009, 1:45 am

Re: Creating a unit in the middle of a round

Post by monochromatic »

Please clarify your intentions, by 'round' do you mean a turn? or scenario?
In any case, EventWML should have the answers you require. For instance, if you wanted to have the unit appear on turn 5:

Code: Select all

[event]
    name = turn 5
    {GENERIC_UNIT 2 (Goblin Spearman) X Y}
    # etc
[/event]
Vilebeggar
Posts: 153
Joined: September 5th, 2018, 5:21 pm
Location: Albania

Re: Creating a unit in the middle of a round

Post by Vilebeggar »

well you can do this, this works

Code: Select all

 
                   [unit]
                      id=skeleton_A
                      type=Skeleton
                      x,y=16,25
                      side=1
                      facing=w
                   [/unit]
               
Competitive Wesnoth. For the fans by the fans.
Post Reply