help for creating a campaign

1 reply [Last post]
sphrix
sphrix's picture
User offline. Last seen 1 day 7 hours ago. Offline
Joined: 2011-04-07
Posts: 207

hi
i'm trying to do a campaign, maybe not a good one but here is my problem
first i look the existing campaign folder to see how i have to do, so i create my own campaign folder, put 2 mission in it, edit the campaing.ini file,
then, i go to campaign in the game, find mine, select the first mission, i play it, win it, but back to campaign menu i don't see the second mission unlocked, so here is my question :

how to unlock the second mission, should i write something special in my lua ?
cause i read some of the mission of the other campaign and didnt notice something special
has it to do with the way i end the mission in the lua script ?

the beachs hogs surfin hedgewars

sphrix
sphrix's picture
User offline. Last seen 1 day 7 hours ago. Offline
Joined: 2011-04-07
Posts: 207

okay, i got an answer, if anyone need it...

"In order to unlock the next mission, you need to save the "Progress" campaign variable before the mission ends. For example, in case of the first mission, you need to put SaveCampaignVar("Progress", "1") in the script on mission success. For examples you can search for SaveCampaignVar in the campaign mission scripts."

the beachs hogs surfin hedgewars

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]