TheReadPanda Posted August 16, 2015 Share Posted August 16, 2015 So I was thinking about a way to make a flat colonization surface and started playing with the launch clamp module.The problem is that the module assumes staging and decoupling no matter what you do. What I want is the stretch effect/ground attach but /not/ the staging or release or power.Now I've tried all the obvious ways of making the module work and even looked at the API LaunchClamp class things.... and it seems that this functionality is embedded.I can't get at the code that shows the way to get the stretched out effect or surface to ground link... What I want are basically ground mounted pylons that can hold something, or perhaps one big pylon with a large disc on top that I can use with EPL to build things on other planets in level stable ways.So my question is this, anyone know if there is a way to take that Launchclamp public void and perhaps just pull out the parts I need while /leaving out/ the parts I don't want, such as staging/release/power? I've tried a few things and feel rusty in my C# already to be honest. Link to comment Share on other sites More sharing options...
TheReadPanda Posted August 18, 2015 Author Share Posted August 18, 2015 So basically I've got the following: First is my attempt to use/override the existing launchclamp by using a class that inherits from it but uses the same keywords to in effect 'hide' the parts I don't want, then the core launchclamp class as displayed in the assembly-CSharp reference file.namespace pylons{ class Pylons: LaunchClamp { [KSPField(isPersistant = false)] public new string anim_decouple_name; [KSPField(isPersistant = false)] public new string releaseFxGroupName; [KSPField(isPersistant = false)] public new string trf_animationRoot_name; [KSPField(isPersistant = false)] public new string trf_towerPivot_name; public int GetStageIndex() { return -1; } [KSPEvent(guiName = "Release Clamp", guiActive = true)] public new void Release() { } [KSPAction("Release Clamp")] public new void ReleaseClamp(KSPActionParam param) { } }}--------------public class LaunchClamp : PartModule, IStageSeparator{ [KSPField(isPersistant = false)] public string anim_decouple_name; [KSPField(isPersistant = true)] public float height; public float initialHeight; [KSPField(isPersistant = false)] public string releaseFxGroupName; [KSPField(isPersistant = true)] public float scaleFactor; [KSPField(isPersistant = false)] public string trf_anchor_name; [KSPField(isPersistant = false)] public string trf_animationRoot_name; [KSPField(isPersistant = false)] public string trf_towerPivot_name; [KSPField(isPersistant = false)] public string trf_towerStretch_name; public LaunchClamp(); public int GetStageIndex(int fallback); public override void OnActive(); public override void OnLoad(ConfigNode node); public void OnPutToGround(PartHeightQuery qr); public override void OnSave(ConfigNode node); public override void OnStart(PartModule.StartState state); public void OnVesselPack(); public void OnVesselUnpack(); [KSPEvent(guiName = "Release Clamp", guiActive = true)] public void Release(); [KSPAction("Release Clamp")] public void ReleaseClamp(KSPActionParam param);}Now this disables the stretch effect and the 'attache to ground' effect which I wanted to keep while keeping the staging which I wanted to get rid of....So anyone have any suggestions on what I'm doing wrong here, or is this the wrong tree completely? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now