http://pastebin.com/gpEi39ab
this script will make a level with boxes, and spawns a camera with :
http://www.leadwerks.com/werkspace/topic/14615-spectator-camera/
this script attached.
When you press the E key, it will generate a new level
Everything should make no error, but there is a problem.
The "player" spawns in the middle of the level , (most of the time)
and once I even had some blocks with no colission at all.
The level is generated towards any directiom (-x,x,y,-y...)
but mostly not in the direction the player is facing,
which makes even more problems.
I have no idea at all why these things happen. Maybe the solution is easy but I dont see it.