Modding Help Save variable from object script in lua that survives "smash" of object

Discussion in 'Starbound Modding' started by madtulip, Dec 10, 2013.

  1. madtulip

    madtulip Phantasmal Quasar

    i need an object with a lua script that creates a variable on activation. this variable needs to persist "somewhere" (maybe in the player entity?) when the object is destroyed. the persistent variable is the problem.

    i triied i.e. to use entity.configParameter or entity.Parameter to create variables in that entity. i would then use the player entity as object instance where to store the values. i cant seem to figure out the syntax. any other ideas? writing to an external file from lua is probably disabled?

    thanks for your time
     
  2. madtulip

    madtulip Phantasmal Quasar

    it would for now also be very good if you knew how i could create a variable in the object instace. for now i can only create global variables in the lua script itself.
     
  3. madtulip

    madtulip Phantasmal Quasar

    Code:
    math["TEST"] = "bla";
    works to transfer information between different objects and persists over theire destruction. it doesnt persist over the shipworld vs the planet world though which is an additional requirement.
     

Share This Page