Glow, darn you!

  • HoHoHoYo
    21st Nov 2010 Member 0 Permalink
    Made a new element. GSTK (glowstick). Trying to make it glow forever, but melt into GLOW when it hits 400 degrees. The problem is the glowing. I cannot seem to find any help at all. powder.c is not yielding any code for PT_GLOW, or any other glowing chemical. Any code examples? Anyone?
  • Dragonfree97
    21st Nov 2010 Member 0 Permalink
    The code is in graphics.c, I think.

    If it says

    if(t==PT_GLOW)

    change to

    if(t==PT_GLOW||t==PT_GSTK)
  • HoHoHoYo
    21st Nov 2010 Member 0 Permalink
    Oh, thank you. That would have taken me forever to figure out. I love you.
  • MiXih
    21st Nov 2010 Member 0 Permalink
    in powder.c add:

    if(t == PT_GSTK)
    {
    if pv[y/CELL][x/CELL] > 2
    {
    parts[i].tmp = true
    }
    }

    and in graphics.c add glowing code:

    if(t==PT_GSTK && parts[i].tmp == true)
    {
    /*glow glowing code */
    }



    Dragonfree97
    Dragonfree97:
    Trying to make it glow forever,

    so fail
  • Dragonfree97
    21st Nov 2010 Member 0 Permalink
    Of course, probably better to use that code, because my code generally ends up with stupid errors.
  • HoHoHoYo
    21st Nov 2010 Member 0 Permalink
    Erm.. What, specifically IS the glowing code?
  • MiXih
    21st Nov 2010 Member 0 Permalink
    HoHoHoYo
    you have in graphics.c:


    if(t==PT_GLOW)
    {

    /* here is glowing code */

    }
  • duartel
    21st Nov 2010 Member 0 Permalink
    off-topic kinda: when i was seeing this a glowing stones comercial has appeared on my browser O.o
  • HoHoHoYo
    21st Nov 2010 Member 0 Permalink
    Not... really what I was asking. I was asking what the code WAS, not where it goes.