Most developers put their audio and art assets in folders to keep things organized. There are two variables available to set the prefix for audio files and image files. The folder name can be anything, but it must end with a slash.
k.imagePrefix = "images/" k.audioPrefix = "audio/"
If a folder isn’t being used, set the variable to nil, like this:
k.imagePrefix = nil
There are also a series of variables for the different images that may be used in the level selector. Only one (k.levelSquareImage) is required, if the others aren’t needed, set their value to nil.
In many cases the background of the level select screen will be set inside the actual choose level storyboard scene. But you can specify a background image to be used here if you like.
k.backgroundImage = "background.png"
The level select image (the graphic that shows behind the level number and stars, etc.) can either be a simple image (typical) or a display group made up of multiple images. If you want to use a single image for the level select image then just enter that image name in k.levelSquareImage as seen below.
But in some cases a simple image isn’t what you need. In which case you can enter a function name in k.customLevel that will return an image or display group. Writing that function is up to you, just make sure it returns an image or group and OMG Level Manager will handle the rest. The current level number is passed in to that function so you can use it if you need to.
k.customLevel = nil k.levelSquareImage = "level-wood.png" -- required unless k.customLevel is used
Note: If you’re using k.customLevel you’ll set that to the correct function name in the calling file, not in ogt_lmdate.lua itself. So it’s left blank in got_lmdata.lua and then set such as: lm.customLevel = myFunctionName
The next two variables contain the image you want for the lock and the stars. If you don’t use locked levels or the whole “Get more stars!” thing, just set one or both to nil and OGT Level Manager will ignore them.
k.lockImage = "lock.png" k.starImage = "staryellow.png"
If you have enough levels that you need to page from one set to another, here’s where you specify the arrow graphics you want to use. Set them to nil if you only have a single screen of levels and they won’t be shown.
k.prevImage = "prev-white.png" k.nextImage = "next-white.png"
There are three sounds that can be triggered in OGT Level Manager. When the player chooses a level and clicks the next or previous arrows. Set the audio file names here. Next and Previous will usually use the same sound, but you can make them each different if you like.
k.selectSoundFile = "levelselect.wav" k.nextPageSoundFile = "changepage.wav" k.prevPageSoundFile = "changepage.wav"