Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 1 (modified by binderm, 4 years ago) (diff)

How to add a leve to the Campaign Menu:

There are severel steps you have to follow, if you want to add a level to the campaign menu:

  • Create a button for the level in CampaignMenu.layout
  • Add the level to CampaignMenu.lua
  • Add the level to the LevelManager:
    • The LevelManager knows only the level listed in config/orxonox.ini. Therefore you have to add your level to this file. Search [LevelManager] and enter campaignMissions_[i]="yourlevelname".
    • Next step is to include your level into the structure of the campaign.
      When you know where you want to include the level, you go to the LevelManager, search for the function buildallLevelStatus() and add your level where you want.
      You have to make a new v={1,0,2,….} (This says, which levels will be activated(1), not activated(0), or only visible(2) when your level is allready won. With this vector you can include your level into the structure of the campaign mode) and then allLevelStatus_[i]→nextLevels=v; (as it is done for all the others).
      You also have to think at what point of the mission your level should be shown or not. To implement that, you have to add a 0/½ to all the other v's.(same principle as for your own v)
      At the end all v's (also the one you initilize) should have the length of your campaignMission_ (=number of levels).