Jump to content

Missing Animation Toggle button


Recommended Posts


Today i Started with a simple Object to test a Animation inside KSP

Once again i followed Nifty255´s Tutorial.


set to Legacy

AutoplayAnimation = off

Mainclip = DoorAnimation

Openclip = Open

Closeclip = Close

All Frames set to correct Length.




name = ModuleAnimateGeneric

animationName = DoorAnimation

StartEventGUIName = Open

EndEventGUIName = Close

actionGUIName = Toggle Door



placed at the End.

in Unity i can see that the Animation works. Also ingame if i tik the autoplay button.

But the GUI Button does not show up ingame. not in the VAB and not in Flight.

How do i can add a GUI (Toggle Door) Button?

am I missing something in the .cfg?


Edited by Nupol
Link to comment
Share on other sites

Maybe something to do with the clips. MAG is setup to use one clip, played backwards for the EndEvent. I tend to end up with a clip that's the same name as the animation name. Anything in the log when MAG is loaded?

So you end up with, in the Animation component:

[B] Animation
[/B]Animation > CargoOpen
Size 1
Element 0 > CargoOpen
[B]Play Automatically

Config looks like:

name = ModuleAnimateGeneric
animationName = CargoOpen
startEventGUIName = Close
endEventGUIName = Open
actionGUIName = Open/Close

Link to comment
Share on other sites

I used one clip.

Lenght: 100

OpenAnimationclip: Start 0 end 49

Close animationclip: Start 50 end 100

in unity

Mainclip = DoorAnimation

Openclip = Open startframe 0 endframe 49

Closeclip = Close startframe 50 endframe 99

What do you mean with MAG?

Edit: MAG = ModuleAnimateGeneric...

so obvious..

Edited by Nupol
Link to comment
Share on other sites

when you import the part to Unity, the embedded animation is a single clip, you see an entry with a Play button icon. when you add more clips in the imported file's Animations tab, more entries will be added to the imported part.

get rid of MainClip and CloseClip. you only need OpenClip from 0 to 49. Unless the door closes in a different way than reverse of door opening, in which case you have to decide which way you want the door to operate.

ModuleAnimateGeneric only uses one animation clip, when you trigger startEvent, the clip is played from frame 0 to last frame and startEvent is disabled. endEvent trigger is enabled when clip reaches last frame and clip is played from last frame to frame 0 when you trigger endEvent. where triggerEvents states return to the beginning.

multiple clips need multiple ModuleAnimateGeneric, and the different clips should not animate same objects.

your animation component should look like this http://i.imgur.com/W0C83HT.jpg; and make sure you are using Animation; not Animator

check the brackets and other syntax in the config. that's the usual suspect when buttons don't show up as expected in a part. Modules are loaded in the same order as they are in the config; one module that fails to load will prevent subsequent modules from loading properly.

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.

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