Post your created elements.

  • vertigo
    28th Jun 2012 Member 0 Permalink

    @boxmein (View Post)

     Because on the menu it will scramble up. :D

    Also, the description is not uppdated every frame... Only the name, color, gravity, falldown, heat, and weight.

  • Dawgie
    29th Jun 2012 Member 1 Permalink

    Here is another version of it

    tpt.el.eqve.enabled=1
    tpt.el.eqve.menu=1
    tpt.el.eqve.menusection=10
    tpt.el.eqve.description="The random element."
    function EQVE()
    a=math.random(0,2)
    b=math.random(-10,10)
    d=math.random(-999,9999)
    e=math.random(0,10000) tpt.el.eqve.name=d
    tpt.el.eqve.color=d
    tpt.el.eqve.gravity=b
    tpt.el.eqve.falldown=a
    tpt.el.eqve.heat=e
    tpt.el.eqve.weight=b
    end
    tpt.register_step(EQVE) function rbow_update(i, x, y, s, n)
    tpt.set_property("tmp",tpt.get_property("tmp",i)+8,i)
    if tpt.get_property("tmp",i)==256 then
    tpt.set_property("tmp",0,i)
    end
    cindex=tpt.get_property("tmp",i)
    tpt.set_property("dcolour",math.floor(math.sin(cindex*3.14159/127.5)*128+128)+math.floor(math.sin(cindex*3.14159/127.5+2.0944)*128+128)*0x100+math.floor(math.sin(cindex*3.14159/127.5+4.1888)*128+128)*0x10000+0xff000000,i)
    end
    tpt.element_func(rbow_update, tpt.el.eqve.id)
  • vertigo
    29th Jun 2012 Member 0 Permalink

    @Dawgie (View Post)

     Mind if i use this in my mod? I like it. Its awesome.

  • Dawgie
    29th Jun 2012 Member 1 Permalink

    Go ahead 

  • lorddeath
    4th Jul 2012 Member 0 Permalink

    yes but as soon as u use lua scipts to edit an element i really dont like to imput all those codes so what could i do besides give up on making a mod

  • Dawgie
    4th Jul 2012 Member 0 Permalink
    @lorddeath (View Post)
    You are aware you can make a file such as lua.txt in the TPT directory with the entire code in it and then open TPT and type in the console dofile "lua.txt" and it will run
  • daninja265
    6th Jul 2012 Member 0 Permalink
    This post has been removed by jacksonmj: No useful content
  • mniip
    6th Jul 2012 Developer 0 Permalink
    This post has been removed by jacksonmj: I see no necro
  • asdf123
    9th Jul 2012 Member 0 Permalink

    so... we download these and put them in the same folder?

  • boxmein
    9th Jul 2012 Former Staff 0 Permalink
    Step 1. Open Notepad, gedit, nano, vim or TextEdit.
    Step 2. Copy everything the lua script has into the text editor.
    Step 3. Select "Save As..."
    Step 4. Select "All Files *.*" from the drop down box below the file name. For gedit, nano and vim, just enter the file name. Not sure about TextEdit.
    Step 5. As the file name, write "awesome-script.lua"
    Step 6. Save it to Desktop.
    Step 7. Find your Powder Toy folder.
    Step 8. Drag the file off the desktop and into the Powder Toy folder.
    Step 9. In The Powder Toy, write 'dofile("awesome-script.lua")'
    Step 10. Profit from all those scripts.