help me

  • AerospaceFan
    22nd September Member 0 Permalink

    soo im making a thing i need help, liquid helium doesnt want to turn into helium (but it works when helium turns to liquid)

     

    -- LIQH (liquid helium)

    local LIQH = elements.allocate("AERO", "LIQH")
    elements.element(elements.AERO_PT_LIQH, elements.element(elements.DEFAULT_PT_GEL))
    elements.property(elements.AERO_PT_LIQH, "Name", "LIQH")
    elements.property(elements.AERO_PT_LIQH, "Description", "Liquid Helium, cold!")
    elements.property(elements.AERO_PT_LIQH, "Colour", 0xC9DCEB)
    elements.property(elements.AERO_PT_LIQH, "MenuSection", elem.SC_LIQUIDS)
    elements.property(elements.AERO_PT_LIQH, "Gravity", 0.1)
    elements.property(elements.AERO_PT_LIQH, "Flammable", 0)
    elements.property(elements.AERO_PT_LIQH, "Explosive", 0)
    elements.property(elements.AERO_PT_LIQH, "Loss", 0.75)
    elements.property(elements.AERO_PT_LIQH, "AirLoss", 0.97)
    elements.property(elements.AERO_PT_LIQH, "AirDrag", 0.03)
    elements.property(elements.AERO_PT_LIQH, "Advection", 0.5)
    elements.property(elements.AERO_PT_LIQH, "Weight", 60)
    elements.property(elements.AERO_PT_LIQH, "Diffusion", 0.0)
    elements.property(elements.AERO_PT_LIQH, "Meltable", 0)
    elements.property(elements.AERO_PT_LIQH, "Hardness", 0)
    elements.property(elements.AERO_PT_LIQH, "Falldown", 10)
    elements.property(elements.AERO_PT_LIQH, "Properties", TYPE_LIQUID)
    elements.property(elements.AERO_PT_LIQH, "State", ST_LIQUID)
    elements.property(elements.AERO_PT_LIQH, "Temperature", 3)
    elements.property(elements.AERO_PT_LIQH, "HeatConduct", 255)
    elements.property(elements.AERO_PT_LIQH, "HighTemperature", 5)
    elements.property(elements.AERO_PT_LIQH, "HighTemperatureTransition", elements.AERO_PT_HLUM)

    -- HLUM (helium)
    local LIQH = elements.allocate("AERO", "HLUM")
    elements.element(elements.AERO_PT_HLUM, elements.element(elements.DEFAULT_PT_HYGN))
    elements.property(elements.AERO_PT_HLUM, "Name", "HLUM")
    elements.property(elements.AERO_PT_HLUM, "Description", "Helium, inert gas, can fuse with HYGN under high temp and pressure.")
    elements.property(elements.AERO_PT_HLUM, "Colour", 0xBBBBBB) -- placeholder
    elements.property(elements.AERO_PT_HLUM, "MenuSection", elem.SC_GAS)
    elements.property(elements.AERO_PT_HLUM, "Gravity", 0.0)
    elements.property(elements.AERO_PT_HLUM, "Flammable", 0)
    elements.property(elements.AERO_PT_HLUM, "Explosive", 0)
    elements.property(elements.AERO_PT_HLUM, "Loss", 0.75)
    elements.property(elements.AERO_PT_HLUM, "AirLoss", 0.97)
    elements.property(elements.AERO_PT_HLUM, "AirDrag", 0.03)
    elements.property(elements.AERO_PT_HLUM, "Advection", 0.9)
    elements.property(elements.AERO_PT_HLUM, "Weight", 60)
    elements.property(elements.AERO_PT_HLUM, "Diffusion", 1.0)
    elements.property(elements.AERO_PT_HLUM, "Meltable", 0)
    elements.property(elements.AERO_PT_HLUM, "Hardness", 0)
    elements.property(elements.AERO_PT_HLUM, "Falldown", 10)
    elements.property(elements.AERO_PT_HLUM, "Properties", TYPE_GAS)
    elements.property(elements.AERO_PT_HLUM, "State", ST_GAS)
    elements.property(elements.AERO_PT_HLUM, "Temperature", 295.15)
    elements.property(elements.AERO_PT_HLUM, "HeatConduct", 122)
    elements.property(elements.AERO_PT_HLUM, "LowTemperature", 5)
    elements.property(elements.AERO_PT_HLUM, "LowTemperatureTransition", elements.AERO_PT_LIQH)
    -- fusion function to be made later

    Edited 2 times by AerospaceFan. Last: 22nd September
  • ReallyJustDont
    23rd September Member 2 Permalink

    It seems like when this line runs:

    elements.property(elements.AERO_PT_LIQH, "HighTemperatureTransition", elements.AERO_PT_HLUM)

    elements.AERO_PT_HLUM is not yet defined. You define it on the next line, but most scripting languages run from top to bottom, so at that point, your element's HighTemperatureTransition will be undefined.

    Try putting all of your elements.allocate() statements at the top of the script.

    Edited 2 times by ReallyJustDont. Last: 23rd September
  • AerospaceFan
    24th September Member 0 Permalink

    oh yeah that works thanks