MGLQ My first element

  • Dawgie
    5th Aug 2012 Member 0 Permalink
    http://pastebin.com/MDhjLKQp

    Thats my first element. It crashes unless you use Cracker64's manager for some reason. You can get the lua manager in the link below.

    https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=14596

    Tips and suggestions are welcome.
    Edit: Updated!
  • mniip
    5th Aug 2012 Developer 0 Permalink
    reconfig -_-
    -1'd if I could
  • ultibore
    5th Aug 2012 Member 0 Permalink

    What are you trying to achieve with the graphics function? It only seems to return a variable (I might be wrong, could you tell me what you are trying to do? If you want it to glow every now and then or when sparked or something like that, you should try it another way (look at the neon element post if you want so, very good example of special effect adding).    I also note that I experienced the same reaction with my TPT legacy when using an other graphics call in the same matter, try abondonging only the graphics function, it should work problemlessly

     

    edit: After searching out an extra bit, I decided that you programmed it exactly as you should (meaning errorless) , don't be offended by my questions mentioned above.

  • ThunderSt
    5th Aug 2012 Member 0 Permalink

    It's good for a first element, I mean, it has no errors and stuff like that..

     

    @Dawgie (View Post)

    Now you could try adding to it some temperature element transformations, like 9000 temp turn the element into dest.

    And maybe give some unique properties.

  • jacob1
    5th Aug 2012 Developer 0 Permalink
    The crash that's happening is this:

    PANIC: unprotected error in call to Lua API (bad argument #2 (number expected, got string)). It's a bug with tpt though. Edit: I just found a fix (I think)

    @mniip (View Post)
    Not everyone is a lua expert like you. They have to start somewhere, and even this is really good for a beginner. (See the graphics function)

    @Dawgie (View Post)
    Is this actually blue green with a bluish glow or did you just copy that from my example?
  • Dawgie
    5th Aug 2012 Member 0 Permalink
    @jacob1 (View Post)
    I used your example then changed it. Sorry I had honestly forgot i used yours.
  • Dawgie
    7th Aug 2012 Member 0 Permalink
    Updated! now has a temp. dependent color blue for cold redish for hot!
    Also
    It changes to bomb at 8726 degrees Celsius!
  • ThunderSt
    7th Aug 2012 Member 0 Permalink

    @Dawgie (View Post)

     

    If you set it to 8726, then it'll become bomb at 8468.85 degrees celsius (less 257.15 degrees, unfortunatly thats how tpt works.. to set a temp to 1000 you have to try to set it 1257.15..

  • mniip
    7th Aug 2012 Developer 0 Permalink
    you mean 273.15 Celsius, right?
  • boxmein
    7th Aug 2012 Former Staff 0 Permalink
    @ThunderSt (View Post)
    That's the difference between Celsius and Kelvin scales. The code works in Kelvin so the console works in Kelvin, but the display says Celsius.