Jump to content

partstates.deactivated doesnt work?


Tuareg

Recommended Posts

hi

i would have a quick question if somebody would know the answer i would be very glad.

i have an animated engine where i want to run the animation only as long as the engine is running. while its idle the partstates.active is false, but if once i activate it it runs forever, even if it runs out of fuel or i shutdown the engine. i check the this.part.State == PartStates.ACTIVE and after once activating the engine it always true...

from wiki: "Engines are IDLE before they are fired, ACTIVE while firing, and DEACTIVATED after running

//out of fuel."

Link to comment
Share on other sites

Do you want active thrust, as in producing thrust? Or activated that when the main throttle changes, the engine responds?

If you want the "engine responds to throttle", the bool ModuleEngines.getIgnitionState is what you are looking for.

If you want "engine actually producing thrust", I think bool ModuleEngines.isOperational is what you want, but that needs testing.

Hope that helps,

D.

Link to comment
Share on other sites

Do you want active thrust, as in producing thrust? Or activated that when the main throttle changes, the engine responds?

If you want the "engine responds to throttle", the bool ModuleEngines.getIgnitionState is what you are looking for.

If you want "engine actually producing thrust", I think bool ModuleEngines.isOperational is what you want, but that needs testing.

Hope that helps,

D.

i was in need of both, these are the perfect ones.

thanks-a-lot

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