New console command

  • Auxitz
    24th Mar 2013 Member 0 Permalink

    I'm not sure if this post would be in Lua scripting, but it DOES invilve the console.

     

    There's a command I've been thinking about, and I decided to share it.

     

    The command to color a certain element by using the console!

     

    It would go as follows: !set color (Element) (Color ID/Color)

     

    I think it would be MUCH easier than having to go through something and paint it all.Don't you think?

  • boxmein
    24th Mar 2013 Former Staff 0 Permalink
    !set dcolour dust 0xRRGGBBAA

    Where RR, GG, BB and AA respectively are numbers from 0x00 to 0xFF (note it's in hexadecimal!).
    RR represents two nibbles of red colour (so that means two numbers)
    GG represents two numbers of green,
    BB represents two numbers of blue and
    AA represents alpha (or transparency, but TPT implements this incorrectly so it practically means lightness instead)

    dcolour is the equivalent of "deco colour" in the TPT code so that's why it's named so.
  • mniip
    26th Mar 2013 Developer 0 Permalink
    @boxmein (View Post)
    since when does console read hexadecimal?

    Well, i've always used tpt.set_property("dcolour",0xFFRRGGBB,"dust")
  • Simon
    26th Mar 2013 Administrator 0 Permalink
    @mniip (View Post)
    It doesn't
    It does now, in the beta!, also, it's ARGB, not RGBA