Jump to content

BillBodkin

Members
  • Posts

    2
  • Joined

  • Last visited

Reputation

0 Neutral
  1. It is a part module and it is indeed attached, I managed to get it to work in the end, all I did was move the vessel.OnFlyByWire += new FlightInputCallback(Fly); to my OnUpdate loop and replace the += with just an = so i dont have it run loads per frame, seems to do the trick hovever I gues this means it will mess up if i attach multiple modules, I havt tested yet but i guess i can just iteriate though all the parts on spawn and see if there are other parts already running the module and only enable self if no others?
  2. How would I go about doing some autopilot stuff? I've got a part module with this code but nothing seems to happen, do i need to enable fly by wire or something else? public void Fly(FlightCtrlState s) { s.mainThrottle = 0.2f; } public override void OnActive() { vessel.OnFlyByWire += new FlightInputCallback(Fly); base.OnActive(); } Thanks in advance Edit: Also functions like OnPartStart() don't seem to be part of the PartModule so I cant override those, is there something i'm doing wrong?
×
×
  • Create New...