03-03-2012, 09:37 PM
(This post was last modified: 03-03-2012, 10:02 PM by Jacob__mybb_import1.)
This game has throwing knives: http://buildism.net/games/Tool-test/2040
Also, the Heights property of Terrain might be useful for making a generator... I'll make a demo game that uses it.
Edit: Here it is: http://buildism.net/games/Terrain-Genera...ample/6087
Script:
[lua]
link(game.Players.ChildAdded, function(p)
local size = game.World.Size.x/2
gamecheduleTask(function()
game.Storage.Buttons:clone().Parent = p.UI
local b = p.UI.Buttons
link(b.Chaotic.MouseDown, function()
local h = {}
for i=1, size do
h[i] = math.random(10, 30)
end
game.Terrain.Heights = table.concat(h, ",")
end)
link(b.Flat.MouseDown, function()
local h = {}
for i=1, size do
h[i] = 20
end
game.Terrain.Heights = table.concat(h, ",")
end)
link(b.Sloped.MouseDown, function()
local h = {}
for i=1, size do
h[i] = (i/size)*20+10
end
game.Terrain.Heights = table.concat(h, ",")
end)
end)
end)[/lua]
Also, the Heights property of Terrain might be useful for making a generator... I'll make a demo game that uses it.
Edit: Here it is: http://buildism.net/games/Terrain-Genera...ample/6087
Script:
[lua]
link(game.Players.ChildAdded, function(p)
local size = game.World.Size.x/2
gamecheduleTask(function()
game.Storage.Buttons:clone().Parent = p.UI
local b = p.UI.Buttons
link(b.Chaotic.MouseDown, function()
local h = {}
for i=1, size do
h[i] = math.random(10, 30)
end
game.Terrain.Heights = table.concat(h, ",")
end)
link(b.Flat.MouseDown, function()
local h = {}
for i=1, size do
h[i] = 20
end
game.Terrain.Heights = table.concat(h, ",")
end)
link(b.Sloped.MouseDown, function()
local h = {}
for i=1, size do
h[i] = (i/size)*20+10
end
game.Terrain.Heights = table.concat(h, ",")
end)
end)
end)[/lua]