Profile image

Modding question

113k PlanariaLab  1.1 years ago

Does anyone know how to add a property that can handle FT like FuseInput on a cannon to a mod part?
Also, I would like to know how to have VariableOutput on the modified part.

  • Log in to leave a comment
  • Profile image

    @hpgbproductions
    Thx

    one year ago
  • Profile image

    @WNP78
    Thank you.
    I've never touched reflection so I don't know if I can handle it, but I'll take the opportunity to give it a try.

    one year ago
  • Profile image
    Dev WNP78

    Unfortunately this didn't quite make it into the mod API, so you can either use an input controller as hpgbproductions says, or use reflection. If you're familiar with reflection you'd need to be calling AircraftControls.GetAxisGetter and make sure to set the contextPart argument with your part script so that it has an expressions context (this is the parameter that's not in the mod api version of the method, and it's what enables the FT parser to run). Then you would have to save the returned function and evaluate it every fixedupdate

    one year ago
  • Profile image

    To handle FT, you can use input controller, but it's not a good solution since mod parts can only have one input controller (i think)

    +1 one year ago
  • Profile image

    @WNP78
    If you don't mind, could you let me know?

    1.1 years ago