Profile image

How do I make a rotator move on gun input?

6 Slinke01  2.3 years ago

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!

  • Log in to leave a comment
  • Profile image
    14.2k Griffon1

    @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.

    +1 2.3 years ago
  • Profile image

    @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)

    +1 2.3 years ago
  • Profile image
    14.2k Griffon1

    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!

    2.3 years ago
  • Profile image
    14.2k Griffon1

    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.

    2.3 years ago
  • Profile image
    11.6k JesusChrist

    Edit: Nevermind, my code didn't work at all, I wonder why this is so difficult to do.

    2.3 years ago
  • Profile image

    FireGuns is the input
    for the delay, i know it's possible to delay it but idk how

    +1 2.3 years ago