EXPL element script

  • tacoHTF
    12th Jul 2013 Member 2 Permalink

    Here's my first elements i have made 

    NEW CODE DONE + NEW ELEMENT! KGAS-DESTROYS ALL ELLEMENTS DMND TOO! 

    CODE:

    local element1 = elements.allocate("TACOHTF", "EXPL")
    elements.element(elements.TACOHTF_PT_EXPL, elements.element(elements.DEFAULT_PT_BCOL))
    elements.property(elements.TACOHTF_PT_EXPL, "Name", "EXPL")
    elements.property(elements.TACOHTF_PT_EXPL, "Description", "Like C-4 but more powerfull.")
    elements.property(elements.TACOHTF_PT_EXPL, "Colour", 0x353535)
    elements.property(elements.TACOHTF_PT_EXPL, "MenuSection", 5)
    elements.property(elements.TACOHTF_PT_EXPL, "Gravity", .0)
    elements.property(elements.TACOHTF_PT_EXPL, "Flammable", 10000000)
    elements.property(elements.TACOHTF_PT_EXPL, "Explosive", 2)
    elements.property(elements.TACOHTF_PT_EXPL, "Loss", 1)
    elements.property(elements.TACOHTF_PT_EXPL, "AirLoss", .5)
    elements.property(elements.TACOHTF_PT_EXPL, "AirDrag", .01)
    elements.property(elements.TACOHTF_PT_EXPL, "Advection", .0)
    elements.property(elements.TACOHTF_PT_EXPL, "Weight", 100)
    elements.property(elements.TACOHTF_PT_EXPL, "Diffusion", 0)
    elements.property(elements.TACOHTF_PT_EXPL, "Hardness", 0)
    elements.property(elements.TACOHTF_PT_EXPL, "Meltable", 1000)
    elements.property(elements.TACOHTF_PT_EXPL, "HeatConduct", 200)
    elements.property(elements.TACOHTF_PT_EXPL, "State", ST_SOLID)

    local element1 = elements.allocate("TACOHTF", "KGAS")
    elements.element(elements.TACOHTF_PT_KGAS, elements.element(elements.DEFAULT_PT_BCOL))
    elements.property(elements.TACOHTF_PT_KGAS, "Name", "KGAS")
     elements.property(elements.TACOHTF_PT_KGAS, "Description", "Killing gas, very destructive, melts, teleports, travels through, move and destroys elements.")
    elements.property(elements.TACOHTF_PT_KGAS, "Colour", 0x255255)
    elements.property(elements.TACOHTF_PT_KGAS, "MenuSection", 5)
    elements.property(elements.TACOHTF_PT_KGAS, "Gravity", .0)
    elements.property(elements.TACOHTF_PT_KGAS, "Flammable", 0)
    elements.property(elements.TACOHTF_PT_KGAS, "Explosive", 0)
    elements.property(elements.TACOHTF_PT_KGAS, "Loss", 1)
    elements.property(elements.TACOHTF_PT_KGAS, "AirLoss", .5)
    elements.property(elements.TACOHTF_PT_KGAS, "AirDrag", .01)
    elements.property(elements.TACOHTF_PT_KGAS, "Advection", .0)
     elements.property(elements.TACOHTF_PT_KGAS, "Weight", 10000000)
    elements.property(elements.TACOHTF_PT_KGAS, "Diffusion", 100)
    elements.property(elements.TACOHTF_PT_KGAS, "Hardness", 0)
    elements.property(elements.TACOHTF_PT_KGAS, "Meltable", 10000)
     elements.property(elements.TACOHTF_PT_KGAS, "HeatConduct", 10000)
     elements.property(elements.TACOHTF_PT_KGAS, "Temperature", 200000000)
    elements.property(elements.TACOHTF_PT_KGAS, "Properties", PROP_DEADLY)
    elements.property(elements.TACOHTF_PT_KGAS, "Properties", PROP_LIFE_KILL_DEC)
    elements.property(elements.TACOHTF_PT_KGAS, "State", ST_GAS)
    elements.property(elements.TACOHTF_PT_KGAS, "Type", TYPE_ENERGY)

    Let me know if something is wrong i can make it better!

  • fireball5000
    12th Jul 2013 Member 1 Permalink
    nice! maybe you could make KGAS explosive? other than that it's great!
  • tacoHTF
    13th Jul 2013 Member 0 Permalink

    okay i make kgas explosive for you

    CODE:

    local element1 = elements.allocate("TACOHTF", "KGAS")
    elements.element(elements.TACOHTF_PT_KGAS, elements.element(elements.DEFAULT_PT_BOMB))
    elements.property(elements.TACOHTF_PT_KGAS, "Name", "KGAS")
    elements.property(elements.TACOHTF_PT_KGAS, "Description", "Killing gas, very destructive melts, teleports, and destroys elements.")
    elements.property(elements.TACOHTF_PT_KGAS, "Colour", 0x255255)
    elements.property(elements.TACOHTF_PT_KGAS, "MenuSection", 5)
    elements.property(elements.TACOHTF_PT_KGAS, "Gravity", .0)
    elements.property(elements.TACOHTF_PT_KGAS, "Flammable", 1)
    elements.property(elements.TACOHTF_PT_KGAS, "Explosive", 2)
    elements.property(elements.TACOHTF_PT_KGAS, "Loss", 1)
    elements.property(elements.TACOHTF_PT_KGAS, "AirLoss", .5)
    elements.property(elements.TACOHTF_PT_KGAS, "AirDrag", .01)
    elements.property(elements.TACOHTF_PT_KGAS, "Advection", .0)
    elements.property(elements.TACOHTF_PT_KGAS, "Weight", 1000000)
    elements.property(elements.TACOHTF_PT_KGAS, "Diffusion", 100)
    elements.property(elements.TACOHTF_PT_KGAS, "Hardness", 0)
    elements.property(elements.TACOHTF_PT_KGAS, "Meltable", 10000)
    elements.property(elements.TACOHTF_PT_KGAS, "HeatConduct", 2000)
    elements.property(elements.TACOHTF_PT_KGAS, "Temperature", 200000)
    elements.property(elements.TACOHTF_PT_KGAS, "Properties", PROP_DEADLY)
    elements.property(elements.TACOHTF_PT_KGAS, "Properties", PROP_LIFE_KILL_DEC)
    elements.property(elements.TACOHTF_PT_KGAS, "State", ST_GAS)
    elements.property(elements.TACOHTF_PT_KGAS, "Type", TYPE_ENERGY)

  • hittox
    13th Jul 2013 Member 1 Permalink

    Nice job! I like the KGAS :D

  • tacoHTF
    13th Jul 2013 Member 0 Permalink

    Thanks! in new code KGAS can pass trough elements and move it. MORE DESTRUCTION!

  • hittox
    13th Jul 2013 Member 1 Permalink

    :D I made a bomb with KGAS.

  • tacoHTF
    14th Jul 2013 Member 0 Permalink

    :D WARNING! use new code because old KGAS loses its temperature.

  • RockPolish
    14th Jul 2013 Member 0 Permalink

    This is really cool, im kinda nooby, but is there a way to save it so I wont have to retype everything when I restart powder toy?

  • jacob1
    14th Jul 2013 Developer 1 Permalink
    @RockPolish (View Post)
    save it to a file named "autorun.lua" next to tpt. Make sure it's not actually autorun.lua.txt, on windows you might have to disable "hide extensions on known file types" or something, or just save it correctly from notepad.
  • KOTOM
    30th Sep 2013 Member 0 Permalink

    43. Invalid element property.