equal
deleted
inserted
replaced
76 |
76 |
77 A_Classic_Fairytale-first_blood.name="Mission 1: First Blood" |
77 A_Classic_Fairytale-first_blood.name="Mission 1: First Blood" |
78 A_Classic_Fairytale-first_blood.desc="Help Leaks a Lot to complete his training and become a proper hedgehog warrior. You will be trained in the art of rope, parachute, shoryuken and desert eagle." |
78 A_Classic_Fairytale-first_blood.desc="Help Leaks a Lot to complete his training and become a proper hedgehog warrior. You will be trained in the art of rope, parachute, shoryuken and desert eagle." |
79 }}} |
79 }}} |
80 |
80 |
81 == Campaign progress == |
81 == Campaign variables / campaign progress == |
82 Initially, only mission 1 is unlocked. To unlock more missions and to mark missions and the campaign as completed, you must set campaign variables. |
82 Campaigns support campaign variables which allow to store arbitrary values about the campaign in the team file. Most importantly, the campaign progress is stored here. This uses the functions `SaveCampaignVar` and `GetCampaignVar`. Note that `SaveMissionVar` and `GetMissionVar` do *not* work in campaign missions. |
83 |
83 |
84 Read [ConfigurationFiles] to learn how campaign variables work. |
84 Initially, only mission 1 is unlocked. To unlock more missions and to mark missions and the campaign as completed, you must set campaign variables. For linear campaigns, you can use this idiom: |
|
85 |
|
86 {{{ |
|
87 -- To be called when mission 5 was won: |
|
88 local missionNumber = 5 |
|
89 local progress = tonumber(GetCampaignVar("Progress")) |
|
90 if progress == nil or progress < 5 then |
|
91 SaveCampaignVar("Progress", "5") |
|
92 end |
|
93 }}} |
|
94 |
|
95 For non-linear campaigns, a more sophisticated unlocking is available. |
|
96 |
|
97 Read [ConfigurationFiles] to learn how campaign variables work in detail. |