Getting scenarios to pass on
Moderator: Forum Moderators
Getting scenarios to pass on
I've fiddled for half an hour with this. The first scenario reads as thus:
[scenario]
name="Brother Against Brother"
id="Brother Against Brother"
map=undmap1
turns=28
{SNIP TIMES}
next_scenario="Skull_Agarash"
The second thus:
[scenario]
name="The Skull of Agarash"
map=undmap1
turns=28
{SNIP TIMES}
id="Skull_Agarash"
next_scenario=null
But winning the first does not send me on to the second! How do I fix this???
[scenario]
name="Brother Against Brother"
id="Brother Against Brother"
map=undmap1
turns=28
{SNIP TIMES}
next_scenario="Skull_Agarash"
The second thus:
[scenario]
name="The Skull of Agarash"
map=undmap1
turns=28
{SNIP TIMES}
id="Skull_Agarash"
next_scenario=null
But winning the first does not send me on to the second! How do I fix this???
You have some of the actions outside of any [event] tag. If you want actions to be executed all in a row, put them all inside the same [event] tag. Also if you want alot of actions of different types to be executed sequentially, then put each action inside its own [command] tag. Your code should be re-written:Circon wrote:I thought I had this fixed now. The Skull level had instructions to make a unit speak, when that unit did not exist yet. I changed the order of the events, so... It still doesn't work.
I've sent you the files for looking over.
Code: Select all
[event]
name=start
[command]
[message]
id=und2_2_1
speaker=narrator
message="After Gwiti destroyed his brother, he was planning a march upon Wesnoth. But a Dark Spirit came to him, counselling him..."
[/message]
[/command]
[command]
[move_unit_fake]
type=Wraith
x=1,2,3,4,5,6,7
y=4,4,4,4,4,4,4
[/move_unit_fake]
[/command]
[command]
[unit]
description=Dark Spirit
type=Wraith
x=7
y=4
side=1
[/unit]
[/command]
[command]
[message]
id=und2_2_2
description=Dark Spirit
message="Gwiti... Gwiti!"
[/message]
[message]
id=und2_2_3
description=Gwiti Ha'atel
message="A Dark Spirit? Surely this is my token of mastery of the undead!"
[/message]
[message]
id=und2_2_4
description=Dark Spirit
message="Gwiti, do not yet march upon Wesnoth. First, you shall go south, against the orcs, and there find the Skull of Agarash."
[/message]
[message]
id=und2_2_5
description=Gwiti Ha'atel
message="What is the Skull of Agarash? Tell me more."
[/message]
[message]
id=und2_2_6
description=Dark Spirit
message="Do you see the three orc clans of this land? Their banners are topped with skulls, as is their custom. But one of these is the Skull of Agarash - which once was mine. Take it and your power will grow greater by far."
[/message]
[/command]
[/event]
Also, the scenario you sent me didn't load properly because the map file has spaces in it (at the end of lines). Once they are removed it works fine. When an error like a scenario failing to load occurs, if you look in the file stderr.txt in the directory Wesnoth is running in, there will generally be an error message (look near the bottom of the file).
David
Don't worry about it too much. These kinds of mistakes are pretty natural. It's more important to know how to diagnose and fix a mistake than have a 'mental checklist' of mistakes.
I make mistakes all the time when doing scenario files. It's pretty normal.
Your biggest tool when a scenario doesn't load is looking in stderr.txt. There will likely be an error message which will hopefully give you a very good idea of what's going wrong.
David
I make mistakes all the time when doing scenario files. It's pretty normal.
Your biggest tool when a scenario doesn't load is looking in stderr.txt. There will likely be an error message which will hopefully give you a very good idea of what's going wrong.
David