Difference between revisions of "Programming levelgens"

From Bitfighter
(New page: Creating levelgen scripts is very straightforward. T '''addWall()''' - Adds a wall to the game<br> '''addItem()''' - Adds a non-wall item to the game<br> '''addLevelLine()''' - Feeds a ...)
(No difference)

Revision as of 04:51, 22 September 2009

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