Re: LSD - Little Sticky Destroyer
Posted: Mon Sep 10, 2012 6:38 pm
"allows for implementation of the map editor"
allows for implementation of the map editor... so you can implement it.. read below.
Then use write to a file like this:
so basically that would output to
I can help you create a map editor, I am very much interested in this project.
As long as I get push permissions to the repository....
edit: after finishing the table thingy and writing this post, i feel so proud of myself (lol im a grammar nazi)
allows for implementation of the map editor... so you can implement it.. read below.
You have to create your own one.paranoiax wrote:Looks, great. Do you allow me to use this in future versions?qaisjp wrote:I'm implementing dynamic map support
EDIT: Saw the pull request, thanks a lot sir. (pretty new to github)
How am i supposed to use a level editor using your changes? (as you wrote so in your pull request)
Then use write to a file like this:
Code: Select all
local code = "return {\n"
code = code .. " boundaries = " .. mapEditor.map.boundaries
code = code .. "\n player = { " .. table.concat(mapEditor.map.spawn, ", ") .. "}, \n"
code = code .. " sensors = {"
for i,v in ipairs(mapEditor.map.sensors) do
code = code .. "\n {" .. table.concat(v.coordinates) .."},"
end
code = code .. " },\n\n walls = {"
for i,v in ipairs(mapEditor.map.walls) do
code = code .. "\n {" .. table.concat(v.coordinates) .. "},"
end
code = code .. " }\n}"
mapUpdate(name, code)
Code: Select all
return {
boundaries = 0,
player = {0, 0},
sensors = {
{0,0,0,0},
{1,2,3,4},
},
walls = {
{0,0,0,0}
}
}
I can help you create a map editor, I am very much interested in this project.
As long as I get push permissions to the repository....
edit: after finishing the table thingy and writing this post, i feel so proud of myself (lol im a grammar nazi)