Jump to content

[Plugin 0.16] Animation part module


Kreuzung

Recommended Posts

As of 1.4.2, the energy plugin also contains a part module called ModuleKrAnimation, which can be used for different things, such as cargo bay doors, landing legs, parts that deploy in some form if they activate (should work with anything activated by staging), stuff that can be "used" by EVAs etc.

Usage:


MODULE
{

[INDENT]name = ModuleKrAnimation
<parameters>
[/INDENT]

}

Do NOT use the string paramters with the Quotes!!!

extendAnim = used animation (this has to be set. If you don't know the name, just apply the part module without parameters and load the game. Place the part on a new ship, and open debug console with Alt+F2. It should show some lines that start with * or **, AFAIK the ** ones are the animation names.)

extendGUI = GUI name for extending (default: Extend)

retractGUI = GUI name for retracting (default: Retract). Set this to 'none' to disable the retract GUI option.

controllableInside = 'always' to always allow controlling it, 'commandable' to only allow if the vessel can be controlled, 'never' to disable manual control from inside the ship completely (default: always)

EVA_Range = range in meters in which Kerbals are able to control it from outside (default: 0, deactivates it completely)

stage = if set to 1, it will extend if the stage it is in is activated (default: 0)

landingGear = if set to 1, it will extend or retract if the landing gear key is pressed (default: 0)

key = Unity keycode for extend/retract. Please don't spam the keyboard for nothing.

state = if set to 1, it will show up the extended state in the editor and start extended on flight scene (default: 0)

animPlayStart = if set to -1, it will show the retract animation in the editor, if set to 1, it will show the extend animation (default: 0, might require state to be set to work)

energyConsumptionExtend = overall energy consumption while extending (default: 0)

energyConsumptionRetract = overall energy consumption while retracting (default: 0)

energyConsumptionExtended = energy consumption per second while extended (default: 0, may cause deadlock situations if energyConsumptionRetract is set too)

As for modeling, it requires a model in the .mu format with an animation called whatever exendAnim is set to (again, if you don't know which animations the model contains, use the way described in the spoiler to find all animations in the model). For retracting, the animation is played backwards.

Note that the part module assumes that the model is in retracted state by default, if it isn't, you might have to use extend as retract and the other way round for some parameters.

Get the plugin from the link in my signature, source code included, CC BY license.

Edited by Kreuzung
Updated for version 1.5
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 2 weeks later...

It's in the spoiler, I grouped it with stage and gear option because they're all keyboard-related.

key = Unity keycode for extend/retract. Please don't spam the keyboard for nothing.

Edit: Derp the link to the keycode list got lost when copying, look it up in the spoier if you need it. Most of them are easy to guess anyway.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...