Units Not Spawning In Custom Scenario WML

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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.

Units Not Spawning In Custom Scenario WML

Postby George345 » June 29th, 2017, 4:04 am

This is my first attempt at a Wesnoth custom scenario I made it and debugged everything but now I'm at a point where it isn't showing any error messages but it is also not working. I am trying to spawn units. I have this at the end of my .cfg file.
Code: Select all
[scenario]
    [unit]
    type=Peasant
    side=4
    name=“King’s Guard”
    x=9
    y=17
    [/unit]

    [unit]
    type=Peasant
    side=4
    name=“King’s Guard”
    x=11
    y=17
    [/unit]

    [unit]
    type=Peasant
    side=4
    name=“King’s Guard”
    x=10
    y=18
    [/unit]
[/scenario]

Could someone please tell me how to fix this?
George345
 
Posts: 5
Joined: June 29th, 2017, 3:57 am

Re: Units Not Spawning In Custom Scenario WML

Postby Pentarctagon » June 29th, 2017, 4:34 am

Moved to the WML Workshop.

To create units, all you need is to put the [unit] tag describing the unit inside an [event]. You also may need to use plain quotes(") rather than the curly quotes(”) you have.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Pentarctagon
Forum Administrator
 
Posts: 2925
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Units Not Spawning In Custom Scenario WML

Postby George345 » June 30th, 2017, 1:32 am

Ok so I did that and I now I have this but it still isn't spawning
Code: Select all
    [event]
        name=start
        [unit]
            type=Peasant
            side=4
            name="King’s Guard"
            x=9
            y=17
        [/unit]

        [unit]
            type=Peasant
            side=4
            name="King’s Guard"
            x=11
            y=17
        [/unit]

        [unit]
            type=Peasant
            side=4
            name="King’s Guard"
            x=10
            y=18
        [/unit]
    [/event]
George345
 
Posts: 5
Joined: June 29th, 2017, 3:57 am

Re: Units Not Spawning In Custom Scenario WML

Postby Pentarctagon » June 30th, 2017, 5:18 am

Can you post the code for the entire scenario? Just what you posted above works for me.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Pentarctagon
Forum Administrator
 
Posts: 2925
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Units Not Spawning In Custom Scenario WML

Postby George345 » July 1st, 2017, 10:16 pm

I figured out what was wrong I forgot to add side 4 so the units couldn't exist I think.
George345
 
Posts: 5
Joined: June 29th, 2017, 3:57 am


Return to WML Workshop

Who is online

Users browsing this forum: No registered users and 3 guests