Modding Help Invisible weapon

Discussion in 'Starbound Modding' started by AArticuno3, Apr 27, 2017.

  1. AArticuno3

    AArticuno3 Big Damn Hero

    Hello,

    Making an invisible staff is easy enough, but I am trying to change the animation so that it appears that you are holding no weapon at all, any ideas?
     
  2. Cyel

    Cyel Scruffy Nerf-Herder

    If you're willing to use a custom script, you could make use of Lua's activeItem.setHoldingItem().

    I made one, all you have to do is include it in your weapon's "scripts" array, like

    Code:
    "scripts" : ["/items/active/weapons/staff/staff.lua", "/items/active/weapons/invisibleweapon.lua"],
    
    or if you wanna spawn it:
    Code:
    /spawnitem rarestaff 1 '{"scripts": ["/items/active/weapons/staff/staff.lua", "/items/active/weapons/invisibleweapon.lua"]}'
    Note that it'd be useable with people who don't have that script, as long as you don't try to give them the item (in which case they'll crash)
     

    Attached Files:

  3. MetaFace

    MetaFace Guest

    Well another way is to leave all rotation values in the activeitem file as zero, "armRotation" in this case. Then set "allowRotate" to false. This should mean you don't look like you are holding a weapon, however when moving your arm will not be animated, it'll just sit there making it obvious.

    I only stated this since it is always better to have more than one solution, even if other ones have silly little stupid issues like mine.
     
    Cyel likes this.
  4. AArticuno3

    AArticuno3 Big Damn Hero

    Wow thank you very much! Your script works perfectly and I'll use it for a lot of weapons!
     
    Cyel likes this.
  5. AArticuno3

    AArticuno3 Big Damn Hero

    Thank you for your input! Thats the first method I tried and I don't like it very much :/
     
  6. MetaFace

    MetaFace Guest

    About as much I expected, just giving options.
     

Share This Page