Jump to content

Need help with coding


Recommended Posts

Hi, I would like to know how I could achieve what I'm about to describe.

Ok, so what I want to be able to do is, have a part, an engine, play an animation and change which fuel it requires after the atmosphere density gets low enough, and then revert back, when the atmosphere density gets high enough again.

I have everything ready to start coding.

I have a some knowledge, although at the moment I am studying Java in my spare time.

Thanks,

Ryan

Link to comment
Share on other sites

  • 2 months later...
The engine module can be found in part.Modules, the propellants in engineModule.propellants.

The question as I understand it, because I have been searching for the same thing, is how to set up what amounts to a boolean statement, or even "manually" change the fuel source. I have tried a number of ways to include three fuel sources while only requiring two (one of which always being the liquid fuel) at a time.

Link to comment
Share on other sites

I have tried a number of ways to include three fuel sources while only requiring two (one of which always being the liquid fuel) at a time.

ModuleEngines is unlikely to support that behaviour. You either need to write a replacement engine module or some sort of pre-processor that checks the available fuel (part.getConnectedResources?) and then modifies ModuleEngines propellants list based on the circumstances.

Link to comment
Share on other sites

Are you referring to a line in the config or underlying module. Can you point me to a good example or tutorial? (i.e. teach me to fish and I will never go hungry again).

Thanks again and in advance for your time and patience.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...