How do I get Pressure?

  • Videogamer555
    31st Jan 2013 Member 0 Permalink
    I am making an element that responds to pressure. How do I detect pressure in LUA? tpt.getp_pressure(x/4,y/4) doesn't work.

    And don't tell me, "if you want to use pressure, code it in C++", because that is one thing I'm staying away from as if it were the PLAGUE. Coding in C was tough enough because half the time it wouldn't even compile (even when EVERYTHING WAS CORRECT),. But I've looked the C++ code and it's even MORE COMPLICATED. So don't even bother suggesting that I code my element in C++. I'm using LUA and that's final (a lot of suggestions I've made in the past have been answered in such a manner, people telling me to code it in C++, which is why I'm including this paragraph to tell you to not bother to tell me to code it in C++).

    So PLEASE just tell me how to do this in LUA.
  • Pilihp64
    31st Jan 2013 Developer 0 Permalink

    Code in C++.

     

    Jokes aside, the current version does not have any pressure access aside from tpt.set_pressure.

    The next version should have new functions to get/set pressure and a few more.

     

    Also "wouldn't even compile (even when EVERYTHING WAS CORRECT)" doesn't make any sense, it would compile if it was correct.  Also the actual method of creating an element is exactly the same as before.