Lua Help Thread

  • boxmein
    26th Aug 2013 Former Staff 0 Permalink
    @xxx70307 (View Post)
    Literally ...
  • xxx70307
    26th Aug 2013 Member 0 Permalink

    function hygnfusionx(i,x,y,s,n)
    local temp = tpt.get_property("temp" , x , y)
    if simulation.pressure(x/4,y/4) >= 50 and temp >= 2273.15 then
    tpt.element_func(tpt.el.hygn.id, function(...) end, true)
    end
    end
    tpt.element_func(hygnfusionx,elements.DEFAULT_PT_HYGN)

     

    does not work

  • boxmein
    26th Aug 2013 Former Staff 0 Permalink
    @xxx70307 (View Post)
    That's because the override works only once and can be reset by resetting TPT by re-opening TPT.
  • jacob2
    27th Aug 2013 Member 0 Permalink
    There is no way to call the original function once you override it, you can only reset the entire element to it's default
  • xxx70307
    27th Aug 2013 Member 0 Permalink

    Then , can you type the code?