Modding Help entity.getOutboundNodeIds() isn't working correctly?

Discussion in 'Starbound Modding' started by iUltimateLP, Jan 7, 2016.

  1. iUltimateLP

    iUltimateLP Orbital Explorer

    Hey guys, I don't know if I am doing something wrong or this is just bugged in Starbound Unstable, which I am playing at. So I tried to use entity.getOutboundNodeIds(0), where 0 is the index of the outbound red wiring node. Heres my test lua thing I set up:
    Code:
    function onInteraction(args)
      world.logInfo("Somebody interacted!")
     
      local w_out = entity.getOutboundNodeIds(0)
     
      world.logInfo("The length: "..#w_out)
     
      for k,v in ipairs(w_out) do
        world.logInfo("Node's entity id is: "..v)
      end
    end
    So yeah, pretty cheap setup to show the lenght of connected Ids and iterate through all, but this doesn't work. I connected one lamp to the outbound node, and now, the length SHOULD be 1, because one entity is connected, and the for each loop SHOULD output the id of that lamp. But the lenght is output as a 0, and therefore the for loop does not print anything, because the table is empty.. Is this a bug in the current version (Glad Giraffe) or am I doing something wrong? Thanks.
     
  2. Storm_UK

    Storm_UK Existential Complex

    There have been several changes to Starbounds api which are causing me similar issues. Try object.getOutboundNodeIds(0) instead now. Unpacking the nightly assets and looking at the scripts there is helping me work things out, would probably be useful for you too to do.
     
    The | Suit likes this.
  3. iUltimateLP

    iUltimateLP Orbital Explorer

    Hmm, object is a nil...
     
  4. iUltimateLP

    iUltimateLP Orbital Explorer

    I reported this as a bug here, as I think this isn't a wrong behaviour from my side.
     

Share This Page