-
Posts
36 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by MoreUmpf
-
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
-
The models are looking good already, but the texures still need improvement as they are not really fitting together nicely.. Especially pic 7 looks awfull texturewise . I hope they are still doing some improvements to this .
-
You know you overbuilt your rocket when...
MoreUmpf replied to Deadpangod3's topic in KSP1 Discussion
When you can't afford your rocket anymore. -
Green Kerbalpoop. Seriously where do they dump all this sh*t during the missions?
-
Alt+F12 wont open the debug toolbar?
MoreUmpf replied to Scorched's topic in KSP1 Gameplay Questions and Tutorials
You should try Alt - F4. Worked for me -
80% builder , 20% modder When I'm playing KSP I'm spending most of the time in the VAB building a craft and optimizing it to a maximum, then testing and also most of the time reverting back to VAB for further optimization Also my current KSP install contains roughly 25+ mods because I always think that I could really enhance the gameplay with whatever mod I recently discovered.
-
What would you want in the next update (0.90)?
MoreUmpf replied to EvilotionCR2's topic in KSP1 Discussion
If you mean the decoubler bug of the 64-bit version, it has been fixed as of 0.24.1: @OP: Better graphics. When I look at all the other games that are using the Unity engine, most of them have really good graphics even compared to modern standarts, whereas KSP has some really outdated graphics. -
You can assign your methods to GameEvents to do this. To add your mehtods to the GameEvents use this in your Start or Awake method: GameEvents.onGameStateCreated.Add(new EventData<Game>.OnEvent(yourMethod1)); GameEvents.onGameStateLoad.Add(new EventData<ConfigNode>.OnEvent(yourMethod2)); You should remove the methods in your OnDestroy method like this: GameEvents.onGameStateCreated.Remove(new EventData<Game>.OnEvent(yourMethod1)); GameEvents.onGameStateLoad.Remove(new EventData<ConfigNode>.OnEvent(yourMethod2)); At last you have to create the two methods yourMethod1(Game game) and yourMethod2(ConfigNode node), where "game" and "node" are the objects that the GameEvent returns.