Programming levelgens
From Bitfighter
Revision as of 04:51, 22 September 2009 by Watusimoto (Talk | contribs)
Creating levelgen scripts is very straightforward. T
addWall() - Adds a wall to the game
addItem() - Adds a non-wall item to the game
addLevelLine() - Feeds a raw level line to the level processor
levelgen:getGridSize() - Returns the current level's gridsize
For example:
for i = 0, 10 do for j = 0, 10 do levelgen:addItem("RepairItem",1 + i * .2, 1 + j * .2); end end