Element Won't Transition

  • godhydra
    13th Jan 2019 Member 0 Permalink

    I've been trying to make one of my elements transition to a different element under pressure, but it doesn't transition. Here's a snippet of my script.

     

    elements.property(metalGa,"HighTemperature",302.9146) elements.property(metalGa,"HighTemperatureTransition",elements.HYDRA_PT_LGAL) elements.property(metalGa,"HighPressure",10) elements.property(metalGa,"HighPressureTransition",elements.HYDRA_PT_BGAL) elements.property(metalGa,"LowPressureTransition",NT)

    elements.property(metalGa,"LowPressure",IPL)

     

    I want it to transition to HYDRA_PT_BGAL, but when I apply pressure it does nothing. If needed, I can post the whole script.

  • jacob1
    13th Jan 2019 Developer 0 Permalink
    The most common reason for this is that elements.HYDRA_PT_BGAL doesn't exist at the time that line of code runs. For that reason, I recommend putting all transition changes at the end of the script, after all your custom elements are defined.

    Also that NT / IPL stuff is unnecessary unless you previously did elements.element and are trying to overwrite a low pressure transition that element had. By default, transitions are already NT (no transition) / IPL (impossible pressure low)
  • godhydra
    13th Jan 2019 Member 0 Permalink

    Alright, that fixed that problem, but now I'm encountering another. So I got the solid to transition into a liquid when heated up and a powder when pressure is applied. The powder just turns into the liquid form when heat is applied. But since the script for the liquid form is above the scripts for the powder and the solid form, the liquid can't transfer back to the solid form. It's organized like this:

     

    Liquid - LowTemperatureTransition(Solid)

    Powder - HighTemperatureTransition(Liquid)

    Solid - HighTemperatureTransition(Liquid)

    Edited once by godhydra. Last: 13th Jan 2019
  • LBPHacker
    13th Jan 2019 Developer 0 Permalink

    You really only need the element ID for those transition properties, so just move the declaration of the variables holding the element IDs and allocation of said IDs above everything else.

  • godhydra
    13th Jan 2019 Member 0 Permalink

    Thank you both! :-)

  • LEOC4
    10th January Member 0 Permalink

    @godhydra (View Post)

     hey you still around