Changing Insulation Helpz!

  • AngrySpam
    28th May 2012 Member 0 Permalink
    Hey, i am making an element, and when its tmp = 2, its insulation will change from like 200 back to 2, but i need to know how, assuming there is even a way. Could somebody help me out here?
    --Cheese
  • billion57
    28th May 2012 Member 0 Permalink

    What do you mean by its insulation changing?

  • plead-for-destruction
    28th May 2012 Member 0 Permalink
    @billion57 (View Post)
    i think he means the insulation rate?
  • AngrySpam
    28th May 2012 Member 0 Permalink
    @billion57 (View Post)
    in elementdata.c, you can chhange the ins. so it transfers heat and whatnot, i want it to be 200 unless i change tmp to 2, in which case it will be set at 2.
  • billion57
    28th May 2012 Member 0 Permalink

    I think it's:

     

    if tmp=2 then

    tpt.el.xxxx.Hconduct=2

     

    xxxx is the name of the element.

  • AngrySpam
    28th May 2012 Member 0 Permalink
    @billion57 (View Post)
    You do realize this is a .c file right? -.-
    EDIT: nvm i can do luacon_eval :P
    EDIT2: now its a laggy ass :(
  • plead-for-destruction
    28th May 2012 Member 0 Permalink
    @billion57 (View Post)
    *cough**cough*java*cough*
  • jacob1
    28th May 2012 Developer 0 Permalink

    If you change the heat conduction of one particle, it changes it for all of them. You should never modify ptypes individually for each particle.

     

    Find this: "//heat transfer code" in update_particles_i in powder.c, and then add something like this: int hconduct = ptypes[t].hconduct;
    if (t == PT_INSL == parts[i].tmp == 2)
    hconduct = 2;
    Then just replace all ptypes[t].hconduct's with hconduct and it should work.