NEW ELEMENT: LHYG

  • InuYasha777
    26th Mar 2014 Member 0 Permalink

    And here it is! My first release of an own element! Thanks to jacob1.

    It's nothing else then Liquid Hydrogen.

    Code:

    --------------------------------------------------------------------

    local LHYG = elements.allocate('IY', 'LHYG')
    elements.element(LHYG, elements.element(elements.DEFAULT_PT_GLOW))
    elements.property(LHYG, "Properties", elem.TYPE_LIQUID)
    elements.property(LHYG, 'Name', 'LHYG')
    elements.property(LHYG, 'Description', 'Liquid Hydrogen.')
    elements.property(LHYG, 'Color', 0x99FFFF)
    elements.property(LHYG, 'MenuSection', 7)
    elements.property(LHYG, 'Gravity', 0.4)
    elements.property(LHYG, "Falldown", 2)
    elements.property(LHYG, "State", elem.ST_LIQUID)
    elements.property(LHYG, 'Flammable', 16384)
    elements.property(LHYG, 'Explosive', 1)
    elements.property(LHYG, 'Temperature', 17)
    local function Lflare(i, colr, colg, colb)
    return 1, 0x00000004, 255, 153, 255, 255, 255, 153, 255, 255
    end
    tpt.graphics_func(Lflare, LHYG)

    ----------------------------------------------------------------------

    Edited once by InuYasha777. Last: 27th Mar 2014
  • Schneumer
    26th Mar 2014 Member 0 Permalink

    @InuYasha777 (View Post)

     Do you mean Hydrogen?

  • KydonShadow
    27th Mar 2014 Member 0 Permalink

    lol yeah?

  • Amy
    27th Mar 2014 Member 0 Permalink

    that would require having cooled hydrogen turn into this...

     

    i think the code is something similar to this:

     

    tpt.el.hygn.lowtemperature="put low temperature here"

    tpt.el.hygn.lowtemperaturetransition=LYHG

     

    (am i getting that right?)

  • CeeJayBee
    27th Mar 2014 Member 0 Permalink

    @Amy (View Post)

     elements.property(LHYG, 'LowTemperatureTransition', 'x') <---- Says what it goes to

     elements.property(LHYG, 'LowTemperature', 'y') <---- Defines what is classed as a low temperature

  • InuYasha777
    27th Mar 2014 Member 0 Permalink

    Haha, you' re right! I changed it into liquid Hydrogen.

    Thanks.

  • Amy
    19th Apr 2014 Member 0 Permalink

    @CeeJayBee (View Post)

     I meant turn hydrogen into liquid hydrogen...

     

    Anyways, got it working and added it to my mod. https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=18569