Jump to content

Apollo13

Members
  • Posts

    1,411
  • Joined

  • Last visited

Everything posted by Apollo13

  1. Previously, MJ Auto-Docking was very wasteful of monoprop. It would expend 250 units of monoprop and never dock. Then, it improved significantly. From 50 meters, it could dock while using only about 20-25 monoprop. Those days are gone. As of KSP 0.25, MJ auto-docking is back to being broken. The RCS jets just continuously spew and never dock. Frustrating. Oh, and MJ Auto-Docking has ALWAYS been stupid concerning relation to target when activated. For instance, if I'm a few meters from the target and pointing at it or nearly so, when I activate MJ-AD, it wastes a lot of monoprop to back away, instead of simply correcting itself to the proper angle.
  2. My only problem with this mod, which I use extensively, is this scenario: 1. Start KSP with DevHelper; go directly to selected game and VAB 2. Launch to the Launch Pad from VAB 3. Close KSP without reverting to VAB 4. Restart KSP (with or without DevHelper) 5. Go to VAB 6. Attempt to go to Launch Pad. I get a message about clearing the Launch Pad. Clicking the "Clear Launchpad" does nothing, so I abort 7. Exit VAB to KSC 8. Click Launch Pad 9. Hit ESC key and clear Launch Pad. "Revert" is not an option. 10. Return to KSC. 11. Clicking on VAB does nothing. The Exit button (lower right corner of screen) is grayed-out, so clicking does nothing. I can avoid the above only if I Revert to VAB from Launchpad after step 2 above.
  3. I don't do that. It's less efficient than establishing orbit at 70k-73k. Then, I achieve target orbit. I never go immediately to target orbit altitude on launch. The contact says "Achieve an Altitude of at least 90000". Perhaps you can simply change that to "Achieve a sub-orbital Altitude of at least 90000." Although, your planned fix is a better solution.
  4. According to the contract, I've not reached an altitude of 90,000. However, as can be seen by by the altimeter and the kData readout, my altitude, Apoapsis, and Periapsis are all above 100,000. Had to Alt-F12 to complete. BTW: the cupola is unmanned for now.
  5. Thank you for this mod!!! I like the new strategy system. This is a great enhancement. Do icons have to be white? I assume not. Your file is a great teaching tool for the rest of us.
  6. After the "petals" open, the antenna extends and scans. Tested in Unity Editor. @h3ron: 64-bit is unstable. Recommend you revert to 32-bit unless you have a million mods. I use about three dozen mods with 32-bit, and 12 gig memory.
  7. @xEvilReeperx: thanks for that code. I'll use that in the future and ask you a few questions as well. Sent you a forum Rep point. I had asked for AddClip() help in the Unity forums. the only response I got back was some guy saying "You're creating an empty clip, and that just seems wrong." Three times. Mind you, he didn't offer any assistance to make it right. He sure as HEII didn't offer a specific coding example (I did ask). Nope, just told me I was doing it wrong. @philotical: Thanks for your assistance and patience. Sent you a Rep point as well.
  8. Just sent. Check your PM inbox. Forgot to mention; when attaching to vessel, need to rotate with the E key.
  9. I went back to a solution I used a month ago. I wanted to use AddClip() so I could set AnimationEvents. After much frustration, decided to drop that effort and go old school. BTW: this is still WIP. I'm using OnFixedUpdate because I have other changes planned that require that. using System; using System.Collections; using UnityEngine; namespace orbitalscanner2 { public class orbitscan : PartModule { [KSPField(isPersistant = true, guiActive = false)] public bool isDeployed = false; [KSPField(isPersistant = true, guiActive = false)] public bool isScanning = false; private Animation anim; public override void OnStart(PartModule.StartState state) { anim = part.FindModelAnimators("Scene")[0]; base.OnStart(state); } //toggles deployment [KSPEvent(active = true, guiActive = true, guiActiveEditor = false, guiName = "Deploy")] public void ToggleDeploy() { Deploy(!isDeployed); return; } public void Deploy(bool status) { isDeployed = status; if (isDeployed) // deploy, start scanning { anim.Rewind(); anim["Deploy"].speed = 1f; anim["Deploy"].normalizedTime = 0f; anim.Play("Deploy"); isScanning = true; } else // stop scanning, retract { isScanning = false; anim.Stop(); anim.Rewind(); anim["Deploy"].speed = -1f; anim["Deploy"].normalizedTime = 1f; anim.Play("Deploy"); } Events["ToggleDeploy"].guiName = (isDeployed ? "Retract" : "Deploy"); return; } // to test OnFixedUpdate, you MUST have at least one stage and Launch!!! public override void OnFixedUpdate() { if (isScanning && !anim.isPlaying) //restart scanner if playing { anim.Rewind(); anim["Scan"].speed = 1f; anim["Scan"].normalizedTime = 0f; anim.Play("Scan"); } base.OnFixedUpdate(); } } }
  10. this is the statement causing the NullReferenceException: foreach (Animation animx in this.vessel.rootPart.FindModelAnimators("Deploy")) I tried: foreach (Animation animx in part.FindModelAnimators("Deploy")) I also tried: foreach (Animation animx in this.part.FindModelAnimators("Deploy")) i don't get the exception. But, I still get no animation. I'm getting the "no animation" problem in the VAB, where I have only two parts: command probe, my part BTW: I use FBX import, because when I tried importing the .BLEND file, I would get an error message that "Blender has stopped working" even when Blender wasn't running. That may have been a problem with Blender v 2.71 Just yesterday, I tried a direct .blend import again, and it worked. I'm using Blender v 2.72. So, I may try that instead of FBX. EDIT: just tried importing .BLEND file. Import worked. I generated the .MU file and Unity did not complain. However, the file was not loaded into KSP. KSP.log says "model does not exist". Yet, the .MU file is there. in the parts directory.
  11. here's the code I used try { foreach (Animation animx in this.vessel.rootPart.FindModelAnimators("Deploy")) { animx.Rewind(); animx.PlayQueued("Deploy"); } } catch(NullReferenceException e) { DebugExtensions.PrintComponents(vessel.gameObject); } I did not get the dump like xEvil shows.
  12. this didn't work and I get a NullReference Exception: foreach (Animation animation in this.vessel.rootPart.FindModelAnimators("Deploy")) { animation.Rewind(); animation.PlayQueued("Deploy"); } In my Unity Animations Inspector, I've defined: Element 0 : Scene (imported in FBX file) Element 1 : Deploy 0-70 Element 2: Scan 70-110 How does yours look? Finally, I don't know how to use xEvilreeper's snippet
  13. The revised code didn't work: anim = part.FindModelAnimators("Deploy")[0]; anim.Rewind(); anim.Play("Deploy"); nor this: anim = part.FindModelAnimators("Deploy")[0]; anim.Rewind(); anim.PlayQueued("Deploy"); I use index = 0 because there is only one part on the entire vessel. In your example, you're searching for all the landing gears on a vessel.
  14. @philotical: Thanks. I previously tried anim.Rewind() followed by anim.Play(). But, I'll tinker with that a bit more. At this point, I'LL TRY ANYTHING. Every time the game enters a scene, does it not "rewind" the animation?
  15. Apparently, nobody at the Unity forums (including a couple Unity engine developers) knows how to do this or has never done it themselves. So, if you can answer this, you need to go work at Unity. I have a single, baked, FBX animation that I imported from Blender with 110 frames. The animation contains two separate actions: Deploy (frames 1-70) and Scan(70-110). When the user clicks the context-menu button that says Deploy, I want to play the first 70 frames of the animation. I would think this would be defined with AddClip(). However, when I display the length of the AddClip() result, it shows 1. when I attempt to play it, it does not play. Here's the code. the "anim.Play("Deploy");" fails to play. However, "anim.Play();" works, but that plays the entire 110 frames, of course. private Animation anim; private AnimationClip clipDeploy; private AnimationClip clipScan; public override void OnStart(PartModule.StartState state) { anim = part.FindModelAnimators("Scene")[0]; clipDeploy = new AnimationClip(); anim.AddClip(clipDeploy, "Deploy", 0, 70); clipScan = new AnimationClip(); anim.AddClip(clipScan, "Scan", 70, 109); Debug.Log("clipDeploy=" + clipDeploy.length); Debug.Log("clipScan=" + clipScan.length); base.OnStart(state); } //toggles deployment [KSPEvent(active = true, guiActive = true, guiActiveEditor = true, guiName = "Deploy")] public void ToggleDeploy() { Deploy(!isDeployed); } private void Deploy(bool status) { isDeployed = status; if(isDeployed) // deploy { anim["Scene"].speed = 1f; anim["Scene"].normalizedTime = 0f; } else // retract { anim["Scene"].speed = -1f; anim["Scene"].normalizedTime = 1f; } anim.Play("Deploy"); Events["ToggleScan"].active = isDeployed; Events["ToggleScan"].guiActive = isDeployed; Events["ToggleDeploy"].guiName = (isDeployed ? "Retract" : "Deploy"); return; } What am I doing wrong? I've also tried defining clips in the Unity Animations Inspector using the same names and frame numbers. No joy. Does nobody do this? If not, how do you play individual pieces of an animation? Or, do you somehow bring multiple animations into Unity and magically select them to play? Is there a tutroial you know of? I've googled until my fingers bled. Do you know a github piece of code you can point me to? I've spent several days on this simple, very frustrating task. Your help is appreciated. And, if you hav a solution, please teach the developers on the Unity forum.
  16. This would be the first of the satellites. A specific part would be added to define its function, i.e., internet, radio, TV, etc. How about going old school (launched 1974)?: AMSAT Oscar-7: Concerning size of the Orbital Scanner , in this image, the green cylinder represents a 2.5m rocket.
  17. Orbital Scanner concept art: The box is attached as a surface mount to the vessel. When placed, the doors are closed until deployment. When scanning, the scanner will rotated up and down constantly. There will be a proper pivot where the lever attaches to the box. I envision this will cost more than the basic scanner for both entry and per piece; perhaps require higher tech level as well. That's malkuth's call..
  18. Been waiting for somebody to develop this a long time. THANK YOU!!!!!!
  19. Couple bugs with latest MCE release: 1. Vostok 2. The vessel and contract simply disappeared after the required duration. The vessel was not the active vessel. I was off doing other things. However, I had set a Kerbal Alarm Clock for the duration. When I received the KAC notification, I looked for the vessel in the Tracking Station. Not there. I went to Contracts Bldg; contract was not in Active nor Archive. I received no notification that the contract was completed. Vessel and Contract just vanished. 2. Voskhod 2. Although I had not launched, nor even constructed, a two-man vehicle, I received notification that I had completed the contract. Notification mentioned that I received the payout (funds, science, rep). I checked the Active Contracts, and it was still listed. Eventually I constructed and launched my Voskhod 2 vessel, and I completed the contract. it is now listed in the Mission Archive. 3. Luna 2. Had same problem ghost22. The command pod vehicle was under my control; it was the active vessel. I did not get completed contract when crashing the vessel. 4. (is this yours?) Launch Company Satellite Into Orbit. I had not built nor launched a satellite vessel. I had accepted the contract. I received notification and payout for putting it into orbit. yet, it is still listed in my Active contracts. Sidebar: Given the new stuff with KSP 0.25, the scanners deserve an update as well. I currently creating animated scanners (orbital, lander). Their operation will be via a partial MissionControllerEC class, so you can incorporate if you so choose. For instance, there will be class properties which indicate if the scanner is deployed or not. The rest of your class can check deployment status to determine if scan can be executed. @ghost22: if you complete a contract, but you still don't get credit, then use ALT-F12. I do, without guilt.
  20. FWIW, my favorite feature is the riddance of an annoyance. Specifically, in the VAB/SPH, if there's a part that I've not purchased, I no longer need to go to the R&D Facility and play "treasure hunt" to find The Node with that part. In the VAB/SPH, I can right-click the part and buy it there. As an added bonus, in the R&D Facility, I can buy all the remaining parts in a node with one click. A small thing? Yes. But, a goody. Someday, I'll get into space planes; I'll enjoy those new parts, too.
  21. Thanks for the info about playing it backwards. I do want to be able to play clips, i.e., not the entire Scene. Also NEED to add AnimationEvents which can be added to only AnimationClips. Also, I can play the entire Scene without any setup. I just use: anim.Play(); Here is the code block: private AnimationEvent openEvt; openEvt = new AnimationEvent(); openEvt.functionName = "ModifyScreen"; openEvt.time = 89; openEvt.stringParameter = "open"; openClip = new AnimationClip(); // openClip.AddEvent(openEvt); anim.AddClip(openClip, "openScreen", 1, 89); anim.Play("openScreen"); Debug.Log("length=" + openClip.length); When I've got the clip playing, then I'll uncomment the AddEvent. And, as I mention above, the clip is three seconds. However, openClip.length shows it as only one second.
  22. I displayed the clip length (openClip.length); it showed a length of 1. However, the clip is really 3 seconds long.
×
×
  • Create New...