untoldwind / KontrolSystem2

Autopilot scripting system for KSP2
Other
54 stars 14 forks source link

Choose a specific vessel at target #176

Open PhilouDS opened 1 month ago

PhilouDS commented 1 month ago

Is it already possible to have access to the list of all the vessels in the game (orbiting, landed or splashed)? And I guess this includes the debris (I don't know if the game considers debris as vessels).

This could be interesting to rendezvous with one specific vessel. For example:

vessel.target = list_of_all_vessels.find(fn(V) -> V.name == "ISS")
untoldwind commented 1 month ago

There is the ksp::vessel::get_vessels_in_range() and ksp::vessel::get_all_owned_vessels() functions. The former is something the game provides, though I am not entirely sure what "in-range" means exactly.

PhilouDS commented 1 month ago

There is the ksp::vessel::get_vessels_in_range() and ksp::vessel::get_all_owned_vessels() functions. The former is something the game provides, though I am not entirely sure what "in-range" means exactly.

OK thanks! I don't know how I missed that!