Jump to content

Combining Part Parameters


Recommended Posts

Hey everyone!

Does anyone here know how to make a part that draws some of its parameters from the part directly above it?

I'm working on a modular engine mod and I need to know how to pass parameters between the parts.

Thanks!

Link to comment
Share on other sites

Just now, Aelfhe1m said:

From within a PartModule you can do: this.part.parent to get the parent part in the hierarchy.

 

So if you had an engine split between a fuel pump and exhaust bell, would you be able to make the fuel pump determine stuff like isp? 

Link to comment
Share on other sites

15 hours ago, njmksr said:

So if you had an engine split between a fuel pump and exhaust bell, would you be able to make the fuel pump determine stuff like isp? 

In principle. Real Fuels does this based on chosen settings within the engine part itself but there's no reason you couldn't get your custom engine module to read values from another part instead. You would of course need robust error handling for a case where user forgot to add a needed part to the vessel or tried to configure things out of the intended sequence.

Link to comment
Share on other sites

16 hours ago, Aelfhe1m said:

In principle. Real Fuels does this based on chosen settings within the engine part itself but there's no reason you couldn't get your custom engine module to read values from another part instead. You would of course need robust error handling for a case where user forgot to add a needed part to the vessel or tried to configure things out of the intended sequence.

So could I base the plugin off of RealFuels?

Link to comment
Share on other sites

3 hours ago, njmksr said:

So could I base the plugin off of RealFuels?

Real Fuels is licensed as CC-BY-SA so you can reuse and re-purpose their code provided you give appropriate attribution. Whether it's useful will depend on just what your own plugin is trying to do.

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...