Modding Help attaching a script to an npc without overwriting bmain's functions

Discussion in 'Starbound Modding' started by magewish4, Apr 28, 2016.

  1. magewish4

    magewish4 Pangalactic Porcupine

    I'm working on modding NPCs and attached my script as well as bmain.lua, the default npc script. My script works fine, but I use the init() and update() functions, so it is overwriting the ones in bmain.lua. Is there a way to have both sets of functions run or do I have to combine the functions?
     
  2. magewish4

    magewish4 Pangalactic Porcupine

    For now, I am just copying the contents of bmain.lua's update and init functions into my script, which works. Has anyone else done any scripting on npcs that I can look at?
     

Share This Page