Jump to content

Help with a part using ModuleGenerator and animations


The Beaver

Recommended Posts

Hey there, still working on the first part I ever made, an ambient xenon attractor. Not sure how to link the animations for the part opening and closing to the "activate generator" and "disable generator" right click gui buttons that are added automatically with the following code:

MODULE
{
name = ModuleGenerator
isAlwaysActive = false
OUTPUT_RESOURCE
{
name = XenonGas
rate = 0.01
}
INPUT_RESOURCE
{
name = ElectricCharge
rate = 1.00
}
}

I made this now and this works for opening and closing the attractor, but how do I link it to the activate generator and disable generator buttons?

MODULE
{
name = ModuleAnimateGeneric
animationName = open
isOneShot = false
startEventGUIName = Enable
}
MODULE
{
name = ModuleAnimateGeneric
animationName = close
isOneShot = false
startEventGUIName = Disable
}

Thanks!

Andrew

Link to comment
Share on other sites

Hey, You really don't need two animations as the closing should just be the opening played in reverse this cuts down the amount of space needed by the context options , and afaik without a plugin there's no way to have an animation run when you activate a part, moduleAnimateGeneric just doesn't have enough features. Try the plugins from Bahamuto or Firespitter

Link to comment
Share on other sites

  • 10 months later...

I to wanted it so the generator can only be activated if the animation is open.

Was not sure what to do with the Firespitter .dll, however I did find this Moduleresourceconverter animation

And after looking around a bit I think I will use 'ModuleDeployableSolarPanel' for mine as it requires light to generate.


MODULE
{
name = ModuleDeployableSolarPanel
raycastTransformName = suncatcher
pivotName = sunPivot
animationName = OpenClose -Put your animation name here
resourceName = Light -Can be anything you want
chargeRate = 1 -Play around with it till your happy
powerCurve
{
key = 206000000000 0 0 0
key = 13599840256 1 0 0
key = 68773560320 0.5 0 0
key = 0 10 0 0
}
}

This is how I had it set up.

GenHelp.png?t=1441110177

I angled the suncatcher 45* so it can pivot to any side of the top. (The arms do animate but look like that in Unity [probably because I reversed the animation])

I know it doesn't fix what you were trying but thought I'd post it for others.

Edited by Lt Vax
Updated Info
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...