Jump to content

Apollo13

Members
  • Posts

    1,411
  • Joined

  • Last visited

Everything posted by Apollo13

  1. Nothing in particular. As a new modder, I'm just looking for sources of info, wherever it might be. That thread was just an example of what I run into.
  2. This is a KSP forum question vice KSP game question. Why am I blocked from certain threads or areas on the forum? I don't mean those areas reserved for the developers, testers, QA, etc. The reasons for that are obvious. But threads like this: blocked thread It is not in the testers area. The thread was pointed to by another forum user. Yet, I cannot see it.
  3. This video showed me how to load my first mod from Unity to KSP. 00:00 - 10:30 is construction in Blender. From 10:30 is getting it into Unity, then KSP. After watching that, review posts 1- 7 of this thread.: http://forum.kerbalspaceprogram.com/threads/92939-Resolved-Need-Help-with-Simple-Animation
  4. Anybody got any idea what that NulllReferenceexception might be referring to? Or, any other ideas concerning my problem? thanks
  5. When I just now tried that, the MS C# editor underlines the word "Field" and says that name is not available in this context. EDIT: But "Fields" does work. I see that I tried to use the attribute "active", which does not exist for KSPFields. m4v, you put me on the right path. thanks. gave you a forum rep point as well.
  6. I can deactivate a KSPEvent with this code: Events["myFunction"].active = false; where "myFunction" refers to the function that controls that attribute. How do I make a KSPField inactive? I Googled for that and searched the forum. No joy. Something like: Field["myField"].active = false; yes, I did try that. thanks
  7. And the answer is: Do not initialize the value of thisPart in the properties/variables list. Initialize it in OnStart().
  8. According to the docs, the "part" is available via a C# Accessor: Part part [get, set] The Part to which this PartModule is attached. Use this to reference the part from your module code So, I tried this public class myModule : PartModule { Part thisPart = (Part) part; I get an error in the MS C# editor saying it cannot find part in the current context. I tried: public class myModule : PartModule { Part thisPart = (Part) base.part; public class myModule : PartModule { Part thisPart = (Part) PartModule::part; I Googled C# Accessors and accessing base classes methods/properties to determine if I was not understanding Accessors. No joy. How should my statement appear? thanks
  9. It compiles (without errors) and executes. The context menu is displayed. When I click the button, the giuName changes. Here is the Unity reference page I used: Animation Play method which contains this code example, not requiring instantiation of a class: using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void Example() { animation.Play("walk"); } } Note that "walk" is not the entire Scene, but a clip from within. I just now looked at Debug Log, and I saw this upon clicking the "Red down", "Red up" button: [Exception]: NullReferenceException: Object reference not set to an instance of an object Here is my project file. The File contains: project file 1) Blender project files, with .blend file, UV map textures, FBX export 2) Unity project files: Models, Texture 3) KSP GameData: with MU, MBMs, cfg
  10. Unity's animation.Play() is not playing my clips. What am I missing? this is the beginning of a part's plugin. Click the part, select "Red down", and the lever rotates down. right-click again, select "Red up", and the lever rotates up. Or, that's what is supposed to do. Currently, it does change the command in the context menu. However, the lever does not move. I verified in Unity's preview window that that entire scene does play. I cannot use ModuleAnimateGeneric, because I'll be using more than a single animation from the Scene animation. This is just a simple example to demonstrate my problem. using UnityEngine; namespace Animate { public class Animate : PartModule { private bool redUp = true; public override void OnStart(PartModule.StartState state) { } [KSPEvent(active = true, guiActive = true, guiActiveEditor = false, guiName = "Red down")] public void LeverRed() { redUp = !redUp; Events["LeverRed"].guiName = (redUp ? "Red down" : "Red up"); if (redUp) animation.Play("redup"); else animation.Play("reddown"); } public override void OnUpdate() { base.OnUpdate(); } } }
  11. The Deployable Solar Panel part for the Hex Truss is ready to launch. Just load it into your GameData directory. See post # 114 for the Solar Panels In the images, the Solar Panel part is sitting atop the standard short Hex Truss. SpeedyB has my permission to include this in any future update.
  12. Did anyone know the answer to this question? I'm having this same trouble as well.
  13. As raidernick mentioned, you MUST HAVE both of these, even if you do not use sun-tracking. raycastTransformName = suncatcher pivotName = suncatcher Helpful links: http://forum.kerbalspaceprogram.com/threads/38408-Rotating-solar-panels-(Unity-configuration) http://forum.kerbalspaceprogram.com/threads/52155-The-Solar-Panel-Problem?highlight=transform http://forum.kerbalspaceprogram.com/threads/41368-Solar-Panel-Question
  14. If you look in the OP, you'll see "crew quarters and passages" under Planned Parts.
  15. OK, then. I'll give that all a try and let you know how it comes out, including the multiple pivots problem. Thank you for taking the time here. I just imported your pioneer5. MU into Blender to see your posts in action. I see what you mean about the suncatcher plane.
  16. Each panel does have a pivot; I assume I pass that part name as "pivotName"? As for "raycastTransformName "? Is that just any part? If I remove the mesh render (post #2), will the part still be displayed?
  17. Here's a thread to what I'm trying to do: Concept art. Three panels rotate 180 degrees; then, solar panels extend. In your example in your post, you show "Deploy" Do you have a separate action for Retract?
  18. I see in your US Probes pack thread, there are several different solar panels. I'm downloading the pack now to see. I caught this in your pioneer5 CFG: MODULE { name = ModuleDeployableSolarPanel sunTracking = true raycastTransformName = suncatcher pivotName = suncatcher isBreakable = false resourceName = ElectricCharge chargeRate = 0.1 powerCurve { key = 206000000000 0 0 0 key = 13599840256 1 0 0 key = 68773560320 0.5 0 0 key = 0 10 0 0 } }
  19. OK. I'll add those things in. But, why does the Squad "solarPanels2" not need those? They track the sun. The CFG in the OP was copied directly from the solarPanels2 CFG. Should I set it to something else?
  20. I'm attempting to create a solar panel part. I copied the following from the stock "solarPanels2" cfg. On the launchpad, my part shows: "Status: Retracted" and "Extend Panels". I click the "Extend Panels" button and my panels extend. However, the Status stills shows "Retracted". Yet, the action button changes to "Retract Panels". Clicking this button does nothing. Also, the context menu window shows no power being generated. I looked at AIES's solar panels, and its config file looks similar. Here is the CFG I copied from stock. "panels" is the name of my animation clip in Unity. MODULE { name = ModuleDeployableSolarPanel animationName = panels resourceName = ElectricCharge chargeRate = 12 powerCurve { key = 206000000000 0 0 0 key = 13599840256 1 0 0 key = 68773560320 0.5 0 0 key = 0 10 0 0 } } I found this thread, but it describes only the variables for this module. http://forum.kerbalspaceprogram.com/threads/41368-Solar-Panel-Question What am I missing? thanks
  21. Thank you all for the replies. That saved me a lot of hours trying to figure out something that can't be done, except through IR.
  22. @Starwaster: If I understand you, the battery in the above example cannot rotate with the red lever. The battery is attached to the object, which consists of the red lever and turquoise plane. True?
×
×
  • Create New...