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.
Modding question
112k PlanariaLab
one year ago
@hpgbproductions
Thx
@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.
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 thecontextPart
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 fixedupdateTo 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)
@WNP78
If you don't mind, could you let me know?