Jump to content

seannybgoode

Members
  • Posts

    8
  • Joined

  • Last visited

Reputation

0 Neutral

Profile Information

  • About me
    Bottle Rocketeer
  1. Also, I'm not trying to create a part here. I'm trying to do something else, so of course my engine contols class wouldn't inherit from part. But like I said initially, code examples please. Would be much more helpful.
  2. Thanks again for the reply. VS still does not like me using the this.vessel on anything. For example: foreach (Part p in this.vessel.parts) { } does not work I understand what you're saying, and I'm aware that I need to reference the currently selected vessel. But I really really need to see a code example to understand what's going on. I don't have a strong background in object oriented programming, so this is very new to me. I understand WHAT I need to do, so don't bother trying to explain that, what I'm lost on is the HOW to do it. "this." was a pretty helpful tip, but how does that relate to "vessel" which is a member of Parts, and how does that relate to Vessel who has parts as a relative??
  3. Introducing the X-52a, the latest in Kerbal Aerospace innovation. Maximum Speed: Mach 1.8 Service Ceiling: 55,000 ft. (16,500 meters) With the avionics package activated, this supersonic beauty flies like a dream. Easy to land on the runway back at the space center and good on fuel. Although I do recommend a flightstick. Note: I do have my jet fuel capacity cranked up on my version of KSP, because I feel the game burns jet fuel way way too fast. This will affect your range, but every thing else will work as advertised. Basic flight instructions: 1. Throttle down, activate your primary airbreathing jet engine. 2. Activate the avionics package (SAS) 3. Throttle up to max 4. Pull up gently to take off. To reach supersonic speeds: 1. Climb to altitude and activate the turbojet engines. 2. Climb to 14500 meters and maintain altitude and heading. 3. Speed should max out around 620 m/s, but it's possible to get her up to 633 m/s [ATTACH=CONFIG]31564[/ATTACH][ATTACH=CONFIG]31565[/ATTACH][ATTACH=CONFIG]31566[/ATTACH][ATTACH=CONFIG]31567[/ATTACH]
  4. Thanks for the reply. Can you give an example of how it would be used? I'm coming from java, so maybe there's some subtle difference I'm not getting. In java if I wanted to use something from the math class, I would say double randomNum = Math.random(); //random being a component of the math libraries So in this if I understand what you're saying, If i want to get the ID of the vessel, I say this: int vesselID = id.vessel(); I know that I'm not understanding the class structure completely, so if someone could shed some light, that would be appreciated.
  5. OK so I'm a noob. I started developing plugins for KSP about 2 hours ago. I'm using VS 2010. I'm not sure what I'm doing wrong, but I'm getting a "an Object Reference is required for the non-static field method or property Vessel.<anything I try to use in the vessel class> Here's my code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; using UnityThreading; namespace KSPEngines { public class EngineControls { protected override void onFlightStart() { startGUI(); } public void startGUI() { if (Vessel.active) { Guid vesselID = Vessel.id; } GUI.Box(new Rect(25,25,100,100), "Engine Controls"); } } }
  6. Okay well, I found this thread, which is great. I'm all setup in VS, and I can see the KSP class libraries and stuff. http://kspwiki.nexisonline.net/wiki/Setting_up_Visual_Studio Now my problem is, I'm new to Object Oriented Programming, so what does the code structure of a plugin look like? Does it have a main method like an application would? How does the flow of control work?
  7. Hi all, I'm looking to develop some plugins for KSP, mostly something that I feel should be simple, but I can't find any basic info anywhere: 1. Where is the API?? I found a partial API on the wiki page, but it had very little on it. 2. Can I load the API into visual studio so it recognizes the classes I'm trying to use? 3. Compiler guidelines. Any rules for compiling the code into plugins? I noticed they're in .dll format. Cheers and thanks for the help.
×
×
  • Create New...