Jump to content

Benjamin Kerman

Members
  • Posts

    837
  • Joined

  • Last visited

Everything posted by Benjamin Kerman

  1. @FreeThinker just making sure: velocityD is a Vector3d, and AddForceAtPosition requires a Vector3 (Unity).
  2. You can add ablator to the parts with a simple MM patch, do it one by one, or write a simple plugin to add the ability to have ablator.
  3. You can change part.vessel.velocityD.normalized to VectorD Vessel.CoM (https://kerbalspaceprogram.com/api/class_vessel.html#a7840de9c960cc10e713ec39f6d4cb240). Edit: ping @FreeThinker
  4. Just cause I'm wondering, could you link the code @Ger_space? Edit: heres a couple of pointers @Sigma88: *int * float
  5. Thomas hit it on the head there: we are trying to communicate with the reader, and trying to make reading the code a pleasant experience. For example, //with this function, we need to use the vessel trying to be docked. It gives a more friendly feel. Comments aren't for the writer's benifit, because they already know what the code means and does. They are for the reader, who is coming into this with (presumably) no coding experience whatsoever.
  6. Just a little metal for all ya that I enjoy listening to during gametime.
  7. @katateochi build your own with an if statement looking at Vessel.Situations. https://kerbalspaceprogram.com/api/class_vessel.html#acea90b73d9b4523383503ec82f2f63bb bool vesselDocked; OnFixedUpdate() { if(Vessel.Situations == 128) { vesselDocked = true; } } (Note: i don’t know if the above code will work, but its my best guess. I have never worked with enums, I’m just relaying what I found. Official MS documentation here: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/enum)
  8. Look in the Module Manager cookbook and try to find some stock configs using this node for a template to use. The KSP API has info on the node values, look at the Public Attributes list here: https://kerbalspaceprogram.com/api/class_part_upgrade_handler_1_1_upgrade.html
  9. You will need more references in your code. Put 'using UnityEngine;' to let it use unity. Your variables arent being set, so resourceDrain is always going to be zero. You will need a Δelectricity. Otherwise, it looks ok. Once you have it written, run it throuh a compiler for testing. E: I'll ping @DoctorDavinci
  10. There is a great AskReddit thread (nsfw) that is about men being harrassed by women. It goes both ways, but men are less likely to speak up about it because of the social pressures. Men are less likely to know that a woman is being creepy. It comes off as heavy flirting. SPEAK UP
  11. Ok, you really just need to know how to declare them, which means for vector3d, you need a set of cart coords. They are declared by the following: var myVector = Vector3d(x, y, z); //creates a new instance of vector 3d using the constructor As you can see, the vectors are created and stored with x y and z coords. Now, taking a look at the QuaternionD referneces, you declare it with the constructors seen here: https://kerbalspaceprogram.com/api/struct_unity_engine_1_1_quaternion_d.html#a3951bc29d076c2dcda4c5bbdde4b7db5 You need to get the position of the CB, and use that for your Vector3d 's. I'm not sure what the w is for QuaternionD's, maybe someone else can offer more insight into that.
  12. Thanks @Rodhern for the response. Would you know anything about navigating through the tree in a plugin using the ConfigNode class in the KSP API? I need to figure out how the values are stored whith an instance of config node for manipulation. Thanks!
  13. You can probably get the information from the astroid type (A, B, C, D, or E) and use that to calculate the radius of the astroid. I can't comment about the actual distances, you might have to hyperedit to a couple of different types to see (with the plugin running reporting how far the kerb is from said astroid) how big they are.
  14. So 1.3.1 has been officially released? Edit: I'm dumb, it is. Just checked announcements.
  15. Very nice work! Looks great!
  16. I was trying to figure out the equation for a line in 3D space, and i dreamed about getting the answer. Wasnt the right one, but it was one!
  17. Well, i'm with @munlander1, on the sick bed. Hopefully just a cold, but still...
  18. Try using paint.net (free, download at https://www.getpaint.net/) or in photoshop for the .dds files. For making the kerbals consume resources, i dont know about that. Creating resources is easy, but i think you might need to write a plugin for that part.
  19. Would that not make sense because you are using part.getConnectedResourceTotals? Why not use Vessel.GetConnectedResourceTotals or similar?
  20. Hey @nascarlaser1 are these tanks that you are making the same as stock tanks? You can open up the textures with paint.net or other image editing program and color them the way you like, then use the MODEL node in the config files to use the stock tank and your new texture.
  21. @DeltaDizzy where are you keeping the source code? I would like to take a look at it, because... umm... I want to learn how to do GUI's...
  22. Use Hide Empty Tech Tree Nodes to hide the nodes that do not have parts in them. This does not delete them, just hides them from view. All your parts should remain. After installing, delete all MM generated files in your GameData folder to make sure the effects take place, as MM uses a cache to reduce load time. This needs to be regenerated for your tech tree to be pruned with this mod.
×
×
  • Create New...