Modding Help Needa help for lua script

Discussion in 'Starbound Modding' started by Noonkisa, Sep 18, 2021.

  1. Noonkisa

    Noonkisa Yeah, You!

    Hi. I'm working my weapon's lua script.
    While making mod, I found a script activeItem.setInstanceValue(String` parameter, <code>Json value)
    So i added this to my weapon's lua file.

    activeItem.setInstanceValue( "level", 2)

    And, it works! ..Only when I throw away my weapon and pick it up again.
    So, I want to make player don't have to throw away weapon and pick it up again.

    Then, I found script.setUpdateDelta(unsigned dt)
    So, I tried to add

    script.setUpdateDelta(1)

    to

    function gunfire:update
    function gunfire:init

    but, it didn't work.

    How can i solve this? Is there any way?
    Please help me D:
     

Share This Page