Everything is Powder (toy)

  • chyzman
    28th Apr 2019 Member 0 Permalink

    This is the first script I have made for tpt. I turned every single thing in the game into powder.

    to install just copy and paste the code into a text document and name it anything.lua then ingame type dofile('anything.lua'). if you don't want to have to activate it just name the file autorun.lua. Good luck making any electronics or machines with this enabled.

    I hope you enjoy the script!

    https://pastebin.com/raw/AFthtT9u

    Edited 5 times by chyzman. Last: 28th Apr 2019
  • LBPHacker
    28th Apr 2019 Developer 0 Permalink

    This does the same (most likely, assuming you included every element):

    for a, b in pairs(tpt.el) do if b.gravity then b.gravity = 1 end end

     

    Edit: you somehow managed to move the OP below my comment, congratulations.

    Edited once by LBPHacker. Last: 28th Apr 2019
  • chyzman
    28th Apr 2019 Member 0 Permalink

    you are right but you would need to include the falldown as well

    Edited once by chyzman. Last: 28th Apr 2019
  • LBPHacker
    28th Apr 2019 Developer 0 Permalink

    Duh.

     

    for a, b in pairs(tpt.el) do if b.gravity then b.gravity = 1 b.falldown = 1 end end

  • chyzman
    28th Apr 2019 Member 0 Permalink

    give me a break i just got into the very basics of lua. The script i made is barely even a scipt and i understood there would be ways to do it with a loop but didn't know how

     

    edit: what is an OP?

    Edited 2 times by chyzman. Last: 28th Apr 2019
  • LBPHacker
    28th Apr 2019 Developer 0 Permalink

    In this context it could either mean Original Poster or Original Post. I meant the Original Post, since for a moment the whole script appeared under my comment. Maybe the forum bugged out, dunno.

     

    Anyway, being new to Lua is of course alright; that's why I decided to show you how it'd be done in a more professional way. The 'duh' is due to my slight annoyance at your response :P I mean, you could have just added the falldown thing yourself.

     

    Can you please chuck that blob of code onto pastebin or somthing and just post a link instead in the OP? (Now you know what that means.) It makes the thread unnecessarily long.

    Edited once by LBPHacker. Last: 28th Apr 2019
  • chyzman
    28th Apr 2019 Member 0 Permalink

    sorry about that, i still have no idea how i would edit that code. also how did you put your code in a box?

  • LBPHacker
    28th Apr 2019 Developer 0 Permalink

    See edit above.

     

    I used the HTML button (rightmost button in the editor) and manually entered <p><code>my code here</code></p>. I think the editor is going to mess this sentence up though so here it is: https://pybin.pw/bcR0

  • chyzman
    28th Apr 2019 Member 0 Permalink

    yours actually affected gol

  • Matera_the_Mad
    6th May 2019 Member 0 Permalink

    LOL It's hilarious, anyway. I had to try it.

     

    I know just enough LUA to edit a script without killing it.