Different starting scenario based on campaign difficulty
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: 837
- Joined: April 14th, 2005, 4:17 am
Different starting scenario based on campaign difficulty
A while back, I wrote a piece of code that makes a campaign start on a diffirent scenario based on its difficulty level. Here is the code:
This code works fine with 1.3.6 and many previous versions. On 1.3.7, however, it crashes the game. What is the problem?
(Attached is a mod of httt that illustrates this. It works fine on 1.3.6, but not on 1.3.7)
Code: Select all
[scenario]
id=scenario_selection
name="Please wait..."
turns=1
map_data="Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg
Gg, Gg, Gg, Gg, Gg"
next_scenario=01_The_Elves_Besieged
[event]
name=prestart
[endlevel]
result=continue_no_save
#ifdef HARD
next_scenario=02_Blackwater_Port
#endif
[/endlevel]
[/event]
[/scenario]
(Attached is a mod of httt that illustrates this. It works fine on 1.3.6, but not on 1.3.7)
- Attachments
-
- sample_campaign.cfg
- Goes in userdata/data/campaigns
- (1.32 KiB) Downloaded 221 times
I tried you file in SVN trunk and it worked fine for both medium and hard difficulty. Whatever the bug was in 1.3.7, it appears to have already been fixed.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."