Modding Help accessing variables from inside an npc

Discussion in 'Starbound Modding' started by Mobius58, Oct 21, 2016.

  1. Mobius58

    Mobius58 Void-Bound Voyager

    I am trying to access the crew list from inside a crewmember using playerCompanions.getCompanions and in general it gives an error because the playerCompanions does not exist in this scope and when the right script are required it still cannot find any crew I thinks is due to the scope of where the function is being run. So does anyone know of a good method to get a variable from the player's scope into the npc's


    Edit---

    I edited this to say that i solved this by using world.sendEntityMessage and sending it to the player's unique id. Also you can get the results out by doing something like output:result() and output:finished() will tell you if the response has been received yet
     
    Last edited: Oct 27, 2016

Share This Page