Hello! I’m trying to make a gun port, as like in the F22 or F35, and I’m not sure if there’s a way to link a hinge rotator to move when I fire the gun. Anyone able to help me out? Also is there a way to delay it closing after I let go of the gun button? Thanks in advance!
@Slinke01 so In the Overload editor (the in-game XML editor which now comes packaged with the game, activated from the mods menu regardless otheref platform) should be a drop down menu for the desired hinge or rotator on the top of the window. There should be an option called Input controller, and in that menu there should be a property called input. Now you would put the desired input code in there and it should work. Works with any other Funky Trees code too.
@Griffon1 thanks for the info! I’m still pretty new to the XML, so just curious what section would I put the command in? Name? Value (which is what I assume you put on your last comment)
Correction:
ceil(smooth(clamp01(FireGuns),(1/delay in sec))
Should work much better.
Tested and approved.
Fair warning, the delay increases the longer you hold down the fire button (for some reason, it shouldnt do that) but if youre only firing in short bursts (like youre supposed to) it shouldnt be a problem.
Hope this helps!
I have an idea for a code with a close delay.
It would go something like this:
clamp01(ceil(smooth(FireGuns,1/second delay as a number)))
I'll have to test it real quick so I'll get back to you.
Edit: Nevermind, my code didn't work at all, I wonder why this is so difficult to do.
FireGuns
is the inputfor the delay, i know it's possible to delay it but idk how