Can anyone create a Throwing Knife script?
#11
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
gameConfusedcheduleTask(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]
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)