why does my element turn red?

  • zBuilder
    28th Dec 2013 Member 0 Permalink

    I was trying to make a new element; but it's always red after adding the high temp transition. without the temperature transition it's the correct color. the default temperature isn't anywhere near it's melting point either.

    <code>

    elements.property(elements.ELEMENT_PT_SDRT, "HighTemperature", 394.261)
    elements.property(elements.ELEMENT_PT_SDRT, "HighTemperatureTransition", elements.DEFAULT_PT_BRCK)

    </code>

    when this is removed it's the right color. is there something wrong with the values given to this?

  • Millions
    28th Dec 2013 Member 0 Permalink

    I've had this issue too. It depends on the element your using, for say, a metal, when metals burn they are turning red. I think this is a bug with lua. Not really sure how to fix this but to change the element your using.

  • jacksonmj
    28th Dec 2013 Developer 0 Permalink

    Try setting the element properties (using element.property(elements.ELEMENT_PT_SDRT, "Properties", ...)) to something that doesn't include PROP_HOT_GLOW

    Edited 3 times by jacksonmj. Last: 28th Dec 2013
  • zBuilder
    29th Dec 2013 Member 0 Permalink

    jacksonmj:

    Try setting the element properties (using element.property(elements.ELEMENT_PT_SDRT, "Properties", ...)) to something that doesn't include PROP_HOT_GLOW

     while it's silly that it applies the hot glow too soon(i.e. at 22 Degrees); I suppose that sugestion would be the only way to fix it. at least the state it transforms into can glow, while the one it comes from doesn't need to so I'm not missing much :)

  • Nobody905
    4th Jan 2014 Member 0 Permalink

    @jacksonmj (View Post)

     That gave me an idea. What if the update function changed the element's properties to include PROP_HOT_GLOW when the element is above X temperature? Would that work?

  • antoine
    4th Jan 2014 Banned 0 Permalink
    This post is hidden because the user is banned
  • jacksonmj
    4th Jan 2014 Developer 0 Permalink

    @Nobody905 (View Post)

    No, because the element properties apply to all particles on screen. If one particle is above X temperature, PROP_HOT_GLOW will be set and all particles will glow even if they aren't above X temperature.

     

    Instead, you can use a graphics function.

  • zBuilder
    6th Jan 2014 Member 0 Permalink

    antoine:

    Its or when you are used: 

    red={0xFF0000} and

    elements.property(elements.ELEMENT_PT_SDRT, "Colour", red), ZBuilder!

     no. it's set to a completely different color which works just fine without the transformation parameters. furthermore it shows the correct color in the menu, indicating the color change is after it's been placed.

  • Antoine14
    22nd Feb 2014 Banned 0 Permalink
    This post is hidden because the user is banned
    Edited once by Antoine14. Last: 22nd Feb 2014