Lua Help Thread

  • GOKOP
    29th Jul 2012 Member 0 Permalink

    How to write script in the console? If I write one line, and press enter, there's a lua error, because end must be on second line.  

  • mniip
    29th Jul 2012 Developer 0 Permalink
    write it in a file then dofile
  • GOKOP
    29th Jul 2012 Member 0 Permalink

    OK, this question is stupid... How to "dofile"? xF

    PLEASE IGNORE THIS QUESTION, I KNOW!

  • mniip
    29th Jul 2012 Developer 0 Permalink
    search on wiki
  • ThunderSt
    30th Jul 2012 Member 0 Permalink

    Hmm.. how do I create a new element? It would be nice to create elements instead of reusing existing ones.

     

    Well, I can reuse EQVE, it does basically nothing, and PSTE is forgotten by most users, but besides those..

  • jacob1
    30th Jul 2012 Developer 0 Permalink
    @ThunderSt (View Post)
    There is currently no way to create new elements. I was going to add a way a while ago, but gave up after a very small amount of work to do other stuff. I'm not sure if i'll try again.
  • ThunderSt
    30th Jul 2012 Member 0 Permalink

    @jacob1 (View Post)

     

    Ok.. I hope someone one day turns element creating through tpt.el possible.

  • xxx70307
    26th Aug 2013 Member 0 Permalink

    how remove the function of an element?

    like HYGN under pressure and temprature trigers a fusion

    i whant to remove it

  • boxmein
    26th Aug 2013 Former Staff 0 Permalink
    @xxx70307 (View Post)
    You can override the existing function with an empty one that does nothing...
    http://boxmein.x10.mx/tptelements/lua/lua-reference.html#tpt.element_func
    tpt.element_func(tpt.el.hygn.id, function(...) end, true)
    Edited once by boxmein. Last: 26th Aug 2013
  • xxx70307
    26th Aug 2013 Member 0 Permalink

    what do we need to replace (....)?

    Edited once by xxx70307. Last: 26th Aug 2013