Jump to content

Isbeorn

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Isbeorn

  1. Hi, that is of course just a code snippet. My own parameter gets it's own logic, but should use some sub parameters that have to be considered first. Just like the part testing contracts, where some conditions have to be met first before the actual part can be tested. So why should i extend the ReachAltitudeEnvelop when i want to include this one as it is as a sub parameter of my own? Anyway with my above mentioned method the sub parameter do not behave correctly...
  2. Hey awesome guide! Used this to mess around on my own, but i'm now stuck on a few problems: I am not able to set up those Contract Parameters right, where there is a specific condition like "Reach Altitude from 2000 to 3000". Once i am in the specified altitude the Parameter for my custom contract gets green (which is fine), but when leaving the altitude range the parameter stays green... Tried using Contracts.Parameters.ReachAltitudeEnvelope and also a custom Paramter. It kind of looks like that the OnUpdate is not triggered anymore once the parameter is set to completed and i do not know how to reset this parameter once the condition is no more met... Also the ReachAltitudeEnvelope is a stock parameter and i do not get why this does not work here. Second thing is about those sub parameters for parameters. I created a new custom parameter and tried to add a sub parameter : Contracts.Parameters.ReachAltitudeEnvelope. I instanciated that one in the constructor and in the OnRegister() Method i add it to my base parameter. Also in OnUnregister i remove that parameter. Problem here is: When accepting a contract i see the sub parameter, but when going through a loading screen i get a new sub paramter added everytime additionally to the old one: class ShipParam : ContractParameter { const String PARAMID = ""; Contracts.Parameters.ReachAltitudeEnvelope alt; public ShipParam() { alt = new Contracts.Parameters.ReachAltitudeEnvelope(3000, 2000, "a"); } protected override void OnRegister() { this.AddParameter(alt, "test"); base.OnRegister(); } protected override void OnUnregister() { this.RemoveParameter(alt); base.OnUnregister(); } protected override void OnUpdate() { base.OnUpdate(); } } } Also the same problem regarding the setting to imcomplete applies here.
×
×
  • Create New...