Jump to content

kurator125

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by kurator125

  1. OK, thanks you all. Now I already know everything I need to know. Thanks
  2. http://forum.kerbalspaceprogram.com/threads/81568-Tutorial-How-to-make-robotic-parts-for-the-Infernal-Robotics-plugin - this is easy So I can not do something like I want? one part(4 sub parts- picture in the first post) and moving red part in Z axis, blue in Y and green in Z at the same time? Can I do this without infernal robotics? I'm trying to make the robot arm. my part would be the first joint(on the moment) in the future, i wanted to make the whole robot arm in one piece.
  3. @sirkut there are only two sub parts, I have four sub parts
  4. Yes ;d I need tips or hints. what I have to look for.
  5. I want to control every part separately (blue, red, green). So I have to use animation?
  6. Hi, i'm learning to create parts. I have: i want rotate: [color - axis] red - Z blue -Y green -Z I need help, what is next? What I need to do in unity? I need write plugin?(I know C# if needed). I want to have a attach point on the top.
  7. thanks, it work but how make part lists? and how to control every part of the singly? I do not want the code, only suggestions.
  8. I have part with plugin and all part have force. I can change this force in gui and when i change force it only one part have new force. How make parts list and how control all parts? I can't find this on wiki. using UnityEngine; using PluginTutorial.Extensions; using KSP.IO; namespace PluginTutorial { public class PluginTutorial : PartModule { private static Rect _windowPosition = new Rect(); private GUIStyle _windowStyle, _labelStyle; private bool _hasInitStyles = false; public float force = 10f; public override void OnStart(PartModule.StartState state) { if (state != StartState.Editor) { if (!_hasInitStyles) InitStyles(); RenderingManager.AddToPostDrawQueue(0, OnDraw); } } public override void OnSave(ConfigNode node) { PluginConfiguration config = PluginConfiguration.CreateForType<PluginTutorial>(); config.SetValue("Window Position", _windowPosition); config.save(); } public override void OnLoad(ConfigNode node) { PluginConfiguration config = PluginConfiguration.CreateForType<PluginTutorial>(); config.load(); _windowPosition = config.GetValue<Rect>("Window Position"); } public override void OnUpdate() { if (this.vessel == FlightGlobals.ActiveVessel) { this.rigidbody.AddRelativeForce(Vector3.up * force * FlightInputHandler.state.mainThrottle); } } private void OnDraw() { if (this.vessel == FlightGlobals.ActiveVessel && this.part.IsPrimary(this.vessel.parts, this.ClassID)) { _windowPosition = GUILayout.Window(10, _windowPosition, OnWindow, "This is a title", _windowStyle); } } private void OnWindow(int windowId) { string sSila; sSila = force.ToString(); GUILayout.BeginHorizontal(); GUILayout.Label(sSila, _labelStyle); GUILayout.EndHorizontal(); if (GUI.Button(new Rect(25, 50, 30, 30), "+")) force += 10; if (GUI.Button(new Rect(75, 50, 30, 30), "-")) force -= 10; GUI.DragWindow(); } private void InitStyles() { _windowStyle = new GUIStyle(HighLogic.Skin.window); _windowStyle.fixedWidth=250f; _windowStyle.fixedHeight = 250f; _labelStyle = new GUIStyle(HighLogic.Skin.label); _labelStyle.stretchWidth = true; _hasInitStyles = true; } } }
  9. Hi, i am learning write plugins to KSP and i have problem :C this code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; namespace ClassLibrary2 { public class TestModule : PartModule { public override void OnStart(StartState state) { // Add stuff to the log print("something silly to the log"); } public void Awake() { } public void Start() { print("Holy Sh*t the plugin started correctly!!"); } } } not work. I can't find :"Holy Sh*t the plugin started correctly!!" or "something silly to the log" in output_log.txt. What is wrong?
×
×
  • Create New...