-
Posts
36 -
Joined
-
Last visited
Reputation
6 NeutralProfile Information
-
About me
Rocketeer
-
Is there a way to add custom events like the ones provided by the GameEvents-class. I created two of my own events like so: [B]public[/B] static class CustomEvents { [B]public[/B] static EventData<ProtoVessel> [I]onStationCompleted[/I] = [B]new[/B] EventData<ProtoVessel>("StationCompleted"); [B]public[/B] static EventData<ProtoVessel> [I]onBaseCompleted[/I] = [B]new[/B] EventData<ProtoVessel>("BaseCompleted"); } But I still had no luck actually firing those events. This is how I add, fire and remove the events: [...] Debug.Log("Firing Station event"); // <-- appears in the log CustomEvents.[I]onStationCompleted[/I].[B]Fire[/B](FlightGlobals.ActiveVessel.[I]protoVessel[/I]); [...] [B]protected[/B] override void [B]OnStart[/B]() { Debug.[B]Log[/B](" OnStart called!"); // <-- appears in the log CustomEvents.[I]onStationCompleted[/I].[B]Add[/B]([B]new[/B] EventData<ProtoVessel>.OnEvent([B]OnStationCompleted[/B])); CustomEvents.[I]onBaseCompleted[/I].[B]Add[/B]([B]new[/B] EventData<ProtoVessel>.OnEvent([B]OnBaseCompleted[/B])); } [B]protected[/B] override void [B]OnDestroy[/B]() { Debug.[B]Log[/B]("OnDestroy called!"); // <-- appears in the log CustomEvents.[I]onStationCompleted[/I].[B]Remove[/B]([B]new[/B] EventData<ProtoVessel>.OnEvent([B]OnStationCompleted[/B])); CustomEvents.[I]onBaseCompleted[/I].[B]Remove[/B]([B]new[/B] EventData<ProtoVessel>.OnEvent([B]OnBaseCompleted[/B])); } [B]private[/B] void [B]OnStationCompleted[/B](ProtoVessel pvessel) { Debug.Log("OnStationCompleted called!"); // <-- does NOT appear in the log } [B]private[/B] void [B]OnBaseCompleted[/B](ProtoVessel pvessel) { Debug.Log("OnBaseCompleted called!"); // <-- does NOT appear in the log } As you can see I did everything like with the normal GameEvents but the firing just doesn't call my functions at all. There's not even an error message in the log. What have I done wrong and how can I fix it?
-
Kerbooster Light: Stock Satellite Launcher
MoreUmpf replied to Torquemadus's topic in KSP1 The Spacecraft Exchange
Ah right, I missed that. -
Kerbooster Light: Stock Satellite Launcher
MoreUmpf replied to Torquemadus's topic in KSP1 The Spacecraft Exchange
Your starting Funds are set to 0. How are you able to build even anything? Other than that it's a nice little spaceplane to start out with -
As of 0.90 you are now able to remove Kerbals from the roster. I accidentally killed Jeb (shame on me ) so I removed him from the roster. When I tried to do a quicksave I got a NullReferenceException(in the debug log) which pointed at KSPAchievements, so I looked into the save file and searched for the ProgressTracking node. Seems like I completed some achievements with Jeb and maybe because of this the game tries to read some data from Jeb when saving the game but fails because I removed Jeb from the list. Is this a new bug or maybe a conversion problem because I played on an older save? Also is there a way to fix this because I can't save my game anymore .
-
I haven't tested it but you might be able to do it by creating your own class extending the Game-class and setting the HighLogic.CurrentGame to the class you just created. The problem is that you wont be able to change the New-Game dialogue to contain your new game mode, so you will have to find another way for the player to select your mode. The Game-class has a predefined enum called Modes which you will have to change in your extending class. Hope this helps.
-
Kerbal Cargo Bay
MoreUmpf replied to silvereagle2061's topic in KSP1 Gameplay Questions and Tutorials
As for the colored font it isn't really a rule but it would much easier to read if you would just write as you just did. If you want to post any pictures(e.g. screenshots) you can upload them to image hosts and put the link in post between . A popular image host on this forum is imgur(it's free). -
Kerbal Cargo Bay
MoreUmpf replied to silvereagle2061's topic in KSP1 Gameplay Questions and Tutorials
If you attach the cargo bay to another one of these Mk2 parts you can attach parts to the middle point between cargo bay and Mk2 part. And if the your cargo doesn't exceed the 1.25m mark you wont be able to see it from the outside. Besides that please only use special text colors in your forum posts if you want to highlight something... -
Any good tutorials?
MoreUmpf replied to Whirligig Girl's topic in KSP1 C# Plugin Development Help and Support
Besides Visual Studio and MonoDevelop I can also recommend SharpDevelop which is free too. There is a Wiki page that shows the differences between these IDEs and also some links to useful tutorials. -
FlightInputHandler.RCSLock RCS state
MoreUmpf replied to lo-fi's topic in KSP1 C# Plugin Development Help and Support
I haven't tested it but the RCS-LED changes it's state depending on this object: FlightGlobals.ActiveVessel.ActionGroups[KSPActionGroup.RCS] -
No helmet on the mün? seems legit