equal
deleted
inserted
replaced
83 |
83 |
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: |
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 |
85 |
86 {{{ |
86 {{{ |
87 -- To be called when mission 5 was won: |
87 -- To be called when mission 5 was won: |
88 local missionNumber = 5 |
|
89 local progress = tonumber(GetCampaignVar("Progress")) |
88 local progress = tonumber(GetCampaignVar("Progress")) |
90 if progress == nil or progress < 5 then |
89 if progress == nil or progress < 5 then |
91 SaveCampaignVar("Progress", "5") |
90 SaveCampaignVar("Progress", "5") |
92 end |
91 end |
93 }}} |
92 }}} |