Element not melting?

  • MrDucku
    29th May 2016 Member 0 Permalink

    I was making a small mod, and the element FOSL won't melt, but it's molten version MFSL, solidifies into FOSL. I'm very new to lua scripting and any help would be greatly appreciated, thanks! :D

     

    Mod code here: https://docs.google.com/document/d/1Le75Rd3imF6nN945MTtTBs_bLN_3q4zTalt3nAZMq94/edit

  • jacob1
    30th May 2016 Developer 1 Permalink
    The reason is actually pretty simple. When you are doing this line: elem.property(fossil, "HighTemperatureTransition", elements.MYMOD_PT_MOLTENFOSSIL), the molten version of the element hasn't been defined yet. The fix is to move it to the end of the script, or at least anywhere after MFSL is defined.

    Good job on the script so far. Most people don't even realize transitions have this issue. I've seen a lot of elements that have the issue ... (mostly an issue in modpacks). Also yay, you're using the elem. constants for menusection and state :)
    Edited once by jacob1. Last: 29th May 2016
  • MrDucku
    30th May 2016 Member 0 Permalink

    hah, thank you so much!! that was really fast lol. I kinda hust copied the formatting from another mod, and then just tweaked the values :P

     

    *10 seconds later

     

    But wait, if I move the molten version to be in front of the solid, then the liquid wouldn't solidify, right?

     

    EDIT#2

    Sorry, I'm bad at this did you mean something like *this(check code again), because didn't work for me. sorry I am such a noob :P

    Edited 2 times by MrDucku. Last: 29th May 2016
  • jacob1
    30th May 2016 Developer 1 Permalink
    @MrDucku (View Post)
    You just posted this thread at the perfect time when I was checking the forums :P

    When you are done you can also submit the script to the script manager: http://starcatcher.us/scripts/#submit-page / post it in this forum. I haven't been approving scripts very quickly at all lately though.

    Edit: You just need to make sure that the state transitions come last. So define MFSL, then FOSL, then do the state transitions for both afterwards.
    Edited once by jacob1. Last: 29th May 2016
  • MrDucku
    30th May 2016 Member 0 Permalink

    ok, I'll submit it when it's done!

  • jacob1
    30th May 2016 Developer 0 Permalink
    @MrDucku (View Post)
    The version you have on the doc right now seems to be working just fine
  • MrDucku
    30th May 2016 Member 0 Permalink

    oh, ok.lol. meh stupid. Thank you so much!!!!!