1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

Analysing conveyer system for hydrogen/oxygen

Discussion in 'Programming (In-game)' started by AlfRomro80, Jul 5, 2020.

  1. AlfRomro80

    AlfRomro80 Trainee Engineer


    I need help finding the right way to analyse the conveyer system of a grid with a script.
    For the most block types this is not problem. You can select the inventory of the block an check with "IsConnectedTo" or "CanTransferItemTo" if the block has a conveyer connection to another on.

    But how to check if a hydrogen tank has a connection to a hydrogen engine or a thruster for example?
    Those blocks can't store any items, so "CanTransferItemTo" doesn't work. All blocks implement the interface IMyTerminalBlock. Because of this you can use "GetInventory().IsConnectedTo", but this doesn't work. I guess because "GetInventory()" returns null?

    The game code itself has to have a way to check if hydrogen can be transfered from one block to another.
    How can I check this within a script of a programmable block?
  2. AlfRomro80

    AlfRomro80 Trainee Engineer

    I'm wondering if my question is that stupid, nobody wants to answer or if there is no answer!?

    But I have another problem calculating hydrogen and oxygen with a script.
    The oxygen farm method "GetOutput()" returns different values than the infoBox in the K-Menu schows.
    I guess "GetOutput()" doesn't return the output per minute but the output per what period?
  3. Roxette

    Roxette Senior Engineer

    You're probably just unlucky and not posting in the best place, you would usually find more active people willing to help with in-game programming problems on the Keen Discord server.