Tmp changing lua

  • DanielGalrito
    25th Nov 2014 Member 0 Permalink

    Is there a way to make tmp increase or decrease in a lua script? I would like to know as im trying to copy some elements of mods to lua.

  • Lord_Bowserinator
    26th Nov 2014 Member 0 Permalink

    tpt.set_property("tmp","element name",[value])

    Yeah I'm not that sure. There is a way to target cords. 

    Edited once by Lord_Bowserinator. Last: 26th Nov 2014
  • DanielGalrito
    26th Nov 2014 Member 0 Permalink

    Is there a way to increase it, not to change it? so if thats the only way ill need a ton of these...

  • jacob1
    26th Nov 2014 Developer 0 Permalink
    tpt.set_property("tmp", thing, tpt.get_property("tmp", thing) + 1)

    But more info would be helpful, like what exactly you want to do.
  • DanielGalrito
    26th Nov 2014 Member 0 Permalink

    The nuculars mod has the radon element, and i want to code it to decrease tmp by 1 every 40 frames

  • Lord_Bowserinator
    27th Nov 2014 Member 0 Permalink

    Then do something like

    var n = 0  (Not sure I don't know much lua)

    n+=1

    if n%40==0 then

    //do what you want

    end

  • Klus
    7th Dec 2014 Member 0 Permalink

    what is tmp and tmp2 for, anyway?

  • minecraft-physics
    7th Dec 2014 Member 0 Permalink
    they're just variables that code for certain traits, a comprehensive list is on the wiki.
  • DanielGalrito
    11th Dec 2014 Member 0 Permalink

    @Lord_Bowserinator (View Post)

     Is that even Lua? Anyway, i think i can do it without that, using life decreasing to be the timer.