Change particle color

  • Zerb196
    30th Nov 2011 Member 0 Permalink
    Hello. I am relatively new to The Powder Toy console and I was wondering if anyone could help me out with learning the coding to change a particle's color. I know it can be done and I've seen countless creations with color-altered particles. I am familiar with codes such as x, y, vx, vy, ctype, and type, but I could use some help learning how to change a particle's color and other advanced codes. I'm open to learning anything. Thank you. 
  • me4502
    30th Nov 2011 Member 0 Permalink
    @Zerb196 (View Post)
    It's the dcolour variable, it's complicated to use in lua, so ask someone like @gamax92
  • Zerb196
    30th Nov 2011 Member 0 Permalink
    I just accidentally stumbled across a tool for changing colors when I accidentally pressed ''B''. So that works. I'm still open to learn more, though.
  • mniip
    30th Nov 2011 Developer 0 Permalink
    @me4502 (View Post)
    not that hard,
    just a doubleword
    least byte (little Endian) is alpha, and should be 255 for normal work
  • Videogamer555
    30th Nov 2011 Member 0 Permalink
    How do I change a particle's default color? I want to make nitroglycerine magenta instead of the normal green color. tpt.el.nitr.color=0xff00ff works to change the color of the icon in the tool box, but does NOT change the default color as displayed on the playing field. Please help me figure out what command to change the displayed default color for an element.
  • jacob1
    30th Nov 2011 Developer 1 Permalink
    I think it's a glitch. Just change it's color before you draw it and it will appear the color you want it to.
  • Videogamer555
    30th Nov 2011 Member 1 Permalink

    jacob1:

    I think it's a glitch. Just change it's color before you draw it and it will appear the color you want it to.


    Nope. doesn't work. I use that command tpt.el.metl.color=0xff00ff (which should make METL magenta) doesn't change the color for already placed OR newly drawn METL. It does NOT work!

    Update. It does not work from the CONSOLE. It requires it it be used in the script file autorun.lua, so that it will be a command executed upon starting the program. It seems not all the changes take place in the program unless the program is "booted" with these changes.
  • zachary1428
    12th Aug 2012 Member 1 Permalink

    to change particle color:

    Press "B" to open color menu and then choose a color then when your done

    use it on a particle.

    Ex:

    Particle= Powder

    Color=Red

    while in color mode, click and drag on the particles and it will turn into color red.

  • Sergeant_Starfruit
    12th Aug 2012 Member 2 Permalink

    A 10 month necro. Nice.

  • dulix11
    12th Aug 2012 Member 1 Permalink
    This post has been removed by jacksonmj: moo