Why doesn't this code work

  • PizzaPlatypus
    20th Sep 2011 Member 0 Permalink
    This code is meant to make the element SPCR to conduct like inst when the temperature is extremely low it's in my sprk.c file here it is:
    http://pastebin.com/zhmLyx0Q
  • Neospector
    20th Sep 2011 Member 0 Permalink
    Check powder.h
    Does it have PROP_CONDUCTS?
    Does it need to have it?
  • PizzaPlatypus
    20th Sep 2011 Member 0 Permalink
    @Neospector (View Post)
    no sorry I forgot to say it works, but only once.
  • jenn4
    20th Sep 2011 Member 0 Permalink
    Life decs are missing.
  • PizzaPlatypus
    20th Sep 2011 Member 0 Permalink
    @jenn4 (View Post)
    what does that mean?
  • cctvdude99
    20th Sep 2011 Member 0 Permalink
    @PizzaPlatypus
    Does the life decrease after it's sparked once? If not, you need to define it to do that, I think. It's somewhere in powder.h. I'm not sure, I haven't done any modding for about 3 weeks now...
  • jenn4
    20th Sep 2011 Member 0 Permalink
    try metls PROP_s.
  • jenn4
    20th Sep 2011 Member 0 Permalink
    it should
  • Pilihp64
    20th Sep 2011 Developer 0 Permalink
    Using flood parts to conduct will require some modification to to flood function, you can see where to make it conduct here:

    // fill span
    for (x=x1; x<=x2; x++)<br/> {
    if (cm==PT_INST&&co==PT_SPRK)
    {
    if (create_part(-1,x, y, fullc)==-1)
    return 0;
    }
    else if (!create_parts(x, y, 0, 0, fullc, flags))
    return 0;
    }


    just add another if and replace the INST with SPCR, also, you can ignore the massive part of INST below that, which is for wire crossings, if you want those, you may have to copy that as well.