How to select a single idle fabber on the current planet in focus

Discussion in 'Mod Support' started by akovac35, February 16, 2018.

  1. akovac35

    akovac35 New Member

    Messages:
    19
    Likes Received:
    5
    Hello,
    I am trying to select a single idle fabber on the current planet in focus, in live_game:

    //get planetId from current primary camera
    var planetId = model.cameraFocus.primary().planetId();

    //how do I select one idle fabber? api.select does not seem to have any such function.
  2. lulamae

    lulamae Planetary Moderator

    Messages:
    799
    Likes Received:
    307
    Would you be after a specific idle fabber? Or just any random one among several available?
  3. grandhomie

    grandhomie Active Member

    Messages:
    173
    Likes Received:
    188
    As a user you can hit your "select all idle fabbers" hotkey then use the "Keybind extensions" mod to select just 1 item from the current selection (that's one out of the many great features of this mod).
    So, as a modder, you could find your answer by looking at the "Keybind extensions" code.

Share This Page