Jump to content

{RESOLVED] Howto: Multiple Animations on a Single Part


Recommended Posts

I've Googled and searched the Modding forum for an answer, and I've not found it. If you know a video or text tutorial or have a code example, I will much appreciate it.

I'm showing a simplified part for demo purposes. It is composed of: a block, two levers, and a collision mesh (node_collider). the collision mesh really plays not part in this; it's here for completeness.

In the demo are two animated levers: red_side and blue-side. The Blender timeline (baked to a single animation during FBX export; NLA and All Actions are unchecked).

The goal: first I click the "Red down" button (in the context menu) and that lever rotates down to the left. I then click the "Blue down" button, and that lever rotates down to the right while the red-side stays down. If I click the Blue-up, the red-side lever remains prone. The red-side goes perpendicular only when I click the "Red up" button.

What's happening: clicking the "Red down" does cause the lever to rotate to the left 90 degrees. However, when I click the "Blue down" button, the red-side immediately pops-up, and the blue-side rotates down to the right. Note that the "Red down" text has changed to "Red up" as it should. Clicking the "Red up" button, of course, has no effect, since the lever is already up.

In the following:

Left: at load to launchpad

Middle: Just after clicking the "red down" button. Context menu now shows "Red up", as it should.

Right: Just after clicking the "Blue down:" button. Red lever is now up. It should remain down.

WMzuosu.jpg

Timeline:

Keyframe 1: Selected red-side lever. Both levers up

Keyframe 30: Rotated red-side down. Did not touch blue-side.

Keyframe 70: Rotated red-side up. Selected blue-side lever. Blue-side still up

Keyframe 100: Rotated blue-side down. Did not touch red-side.

Red-side timeline:

CD0HpDf.jpg

Blue-side timeline:

e0BATjK.jpg

Unity animation (ignore the redUp and blueUp):

oj0845o.jpg

part.cfg


MODULE
{
name = ModuleAnimateGeneric
animationName = redDown
startEventGUIName = Red down
endEventGUIName = Red up
}

MODULE
{
name = ModuleAnimateGeneric
animationName = blueDown
startEventGUIName = Blue down
endEventGUIName = Blue up
}

Do I have to solve this programmatically via a plugin? If so, a tutorial and/or code example is appreciated.

thanks.

Edited by Apollo13
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...