Jump to content

JuhaJGamer

Members
  • Posts

    26
  • Joined

  • Last visited

Reputation

0 Neutral

Profile Information

  • About me
    Bottle Rocketeer

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks, will look into it. Stupid that there doesn't seem to be an obvious way to do it, since so many nearly useless events have an obvious way to intercept them. Then again, the launch function was probably one of the first implemented, ever.
  2. So, I've got a bit of a problem. 1: I haven't coded since like 0.90, and 2: I need to get myself a dialog box BEFORE the loading screen on launches. That is, execute a function when the "Launch" button is pressed in either the editor or the ksc screens, preventing the loading until the function returns and/or is resolved in another way. For example, the recovery warning when trying to launch with a vessel on pad does this. I merely ask for two things: Is it possible, and if, how. And of course I have the alternative of using onVesselRollout or something, but I really want to do it before the loading screen. Before attacking me for this, I have spent the last hour trying to figure it out. Sorry for the possibly stupid question, just looking for help, and thanks in advance! For context I'm using a ScenarioModule with the [KSPScenario] attribute.
  3. Alright thanks, but now I have an another problem, I can get any other resource, but I cant get EC for some reason, I have tried if (part.RequestResource("ElectricCharge", rayPowerUsage / 1000) < chargeFuelUsage / 1000) if (part.RequestResource("Electric Charge", rayPowerUsage / 1000) < chargeFuelUsage / 1000) and if (part.RequestResource("EC", rayPowerUsage / 1000) < chargeFuelUsage / 1000) None of them seem to work though
  4. So, I fixed my rendezvous problem by stealing some Hyperedit code(totally legal) but i might have a small problem... I have a [KSPEvent] but it cant bind for some reason: [EXC 00:25:12.469] ArgumentException: Couldn't bind to method 'fireCannon'. System.Delegate.GetCandidateMethod (System.Type type, System.Type target, System.String method, BindingFlags bflags, Boolean ignoreCase, Boolean throwOnBindFailure) System.Delegate.CreateDelegate (System.Type type, System.Object target, System.String method, Boolean ignoreCase, Boolean throwOnBindFailure) System.Delegate.CreateDelegate (System.Type type, System.Object target, System.String method, Boolean ignoreCase) BaseEventList.CreateDelegates (System.Object part) BaseEventList..ctor (.Part part, .PartModule module) PartModule.ModularSetup () PartModule.Awake () UnityEngine.GameObject:AddComponent(Type) Part:AddModule(String, Boolean) Part:AddModule(ConfigNode, Boolean) PartLoader:ParsePart(UrlConfig, ConfigNode) <CompileParts>c__Iterator62:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) [ERR 00:25:12.473] PartLoader: Encountered exception during compilation. System.NullReferenceException: Object reference not set to an instance of an object at PartModule.Load (.ConfigNode node) [0x00000] in <filename unknown>:0 at Part.AddModule (.ConfigNode node, Boolean forceAwake) [0x00000] in <filename unknown>:0 at PartLoader.ParsePart (.UrlConfig urlConfig, .ConfigNode node) [0x00000] in <filename unknown>:0 at PartLoader+<CompileParts>c__Iterator62.MoveNext () [0x00000] in <filename unknown>:0 [ERR 00:25:12.475] PartCompiler: Cannot compile part My code consists of: [KSPEvent(guiActive = true, guiName = "Fire cannon")] public bool fireCannon() { ScreenMessages.PostScreenMessage("The precharge will not check if you have fuel, and just use it. Check to have 7.5 units of Korex and plenty of EC"); //check if enough fuel if (part.RequestResource(korexID, chargeFuelUsage) == chargeFuelUsage) { //start charge coroutine StartCoroutine(prechargeThing()); } return false; } And this prevents PartCompiler from loading the part
  5. So to me any nuke can destroy any vessel within ~30km radius. even the small 340kt. the bomber at 10km going at over 400 m/s away from the bomb. speeding up to 25 horizontal distance away from the b-61 can get destroyed in the explosion.
  6. So I have a mod, and it's in VS2015. Also it uses the Vwctor3d class Vessel.obt_velocity. Now VS says I need KSPUtil for that class. What do? http://imgur.com/a/GJlMq
  7. None of this helped, even rebooted my computer(dont know why I did that tbh.) hello?
  8. Tried it. It points to "J:\Ohjelmat\Pelit\Kerbal Space Program\KSP_Data\Managed\Assembly-CSharp.dll" which is my KSP Install. It is up-to-date(Steam) and rebooting VS didn't really help.
  9. I have the newest version of KSP and its Assembly-CSharp. VS still insists on the KSPUtil refrence http://imgur.com/gallery/GJlMq
  10. Vessel.obt_velocity is of the type Vector3d. for some reason VS2015 wants KSPUtil for this (KSP cant recognise KSPUtil.dll anymore, because it was all moved to Assembly-CSharp.dll)
  11. Ok, these are the two methods that I have tried. Directly editing the "quicksave" file takes time. There could be more vessels of the same name. And after that you must load it which may give you a quick fps-spike. The stock debug tool I cant find. Anywhere. No docs, no classes, no functions, It's like it doesn't exist. Velocity, I learned it actually today so that's great
×
×
  • Create New...