easy FRAT temp set

  • xiaohei_5753
    6th Nov 2022 Member 0 Permalink

    function ClassicPowder()

    tpt.start_getPartIndex()
    while tpt.next_getPartIndex() do
    local index = tpt.getPartIndex()
    if tpt.get_property("type",index) == 159 then
    local a = tpt.get_property("ctype",index)*10 + 273.15
    tpt.set_property("temp",a,index)
    end
    if tpt.get_property("type",index) == 189 then
    local a = tpt.get_property("ctype",index) + 273.15
    tpt.set_property("temp",a,index)
    end
    end

    end

    tpt.register_step(ClassicPowder)

     

    How to use

    1.Create a .txt file

    2.Copy the above to the file

    3.Change the file name extension into .lua

    4.Copy the file to the script folder

    5.Open Script Manager,and open "local"

    6.Choose the file you have made just now

     

    Edited once by xiaohei_5753. Last: 12th Nov 2022