![]() |
Can anyone create a Throwing Knife script? - Printable Version +- 2DWorlds Forums (http://2dworlds.buildism.net/forum) +-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4) +--- Forum: Scripting (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=13) +--- Thread: Can anyone create a Throwing Knife script? (/showthread.php?tid=8951) Pages:
1
2
|
RE: Can anyone create a Throwing Knife script? - Jacob__mybb_import1 - 03-03-2012 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-Generation-Example/6087 Script: [lua] link(game.Players.ChildAdded, function(p) local size = game.World.Size.x/2 game ![]() 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] RE: Can anyone create a Throwing Knife script? - Ashely - 03-03-2012 Interwebs do you think you can make the knife texture? RE: Can anyone create a Throwing Knife script? - Fat_Sacks - 03-04-2012 ![]() Not my best sprite, but people are gonna be throwing these. RE: Can anyone create a Throwing Knife script? - Qwertygiy - 03-04-2012 Hmm, the leaderboard buttons seem a bit "cut off": ![]() Any way you could make them a bit smaller so that there's enough space around the edges for it to be whole? More work done on the leaderboard now. I have a function that automatically generates it (for when the player joins) and I have one that makes the stat directory for the player (again, when joining). Things I still need to work on are updating the UI when stats change, making the UI off-screen by default and adding a button that pulls it up temporarily, and maybe make it alphabetize the list of players or remove the players' stats when they leave the server -- I'm not sure about those. RE: Can anyone create a Throwing Knife script? - Mustachio - 03-04-2012 Your throwing knife, is done. Oh btw, everyone, if you want a preview on what she's gonna do with these... |