Modding Help Compound gun is silent

Discussion in 'Starbound Modding' started by Iaeyan Elyuex, Sep 5, 2017.

  1. Iaeyan Elyuex

    Iaeyan Elyuex Cosmic Narwhal


    {
    "itemName" : "dualgravgun",
    "price" : 5000,
    "maxStack" : 1,
    "rarity" : "essential",
    "description" : "The Blue Eagles Technologies Handheld Gravity Liquid Device.",
    "shortdescription" : "Gravliquid Gun",
    "tooltipKind" : "gun2",
    "category" : "Portal Reference",
    "twoHanded" : true,
    "itemTags" : ["weapon","ranged","machinepistol"],
    "level" : 2,
    "inventoryIcon" : "dualgravgun.png",

    "animation" : "/items/active/weapons/ranged/gun.animation",
    "animationParts" : {
    "butt" : "",
    "middle" : "dualgravgun.png",
    "barrel" : "",
    "muzzleFlash" : ""
    },
    "animationCustom" : {
    "sounds" : {
    "fire" : []
    }
    },
    "baseOffset" : [0.8, 0.34],
    "muzzleOffset" : [1.5, 0.125],

    "scripts" : ["/items/active/weapons/ranged/gun.lua"],

    "elementalType" : "electric",

    "primaryAbility" : {
    "scripts" : ["/items/active/weapons/ranged/gunfire.lua"],
    "class" : "GunFire",
    "fireTime" : 0.156,
    "baseDps" : 2,
    "energyUsage" : 5,
    "fireType" : "auto",
    "inaccuracy" : 0.02,
    "projectileCount" : 1,
    "sounds" : {
    "fire" : [ "/sfx/bluegravgunfire.ogg" ]
    },
    "projectileType" : "squirtbluegrav",
    "projectileParameters" : {
    "speed" : 32
    },
    "stances" : {
    "idle" : {
    "armRotation" : 0,
    "weaponRotation" : 0,
    "twoHanded" : true,

    "allowRotate" : true,
    "allowFlip" : true
    },
    "fire" : {
    "duration" : 0,
    "armRotation" : 0,
    "weaponRotation" : 0,
    "twoHanded" : true,

    "allowRotate" : false,
    "allowFlip" : false
    },
    "cooldown" : {
    "duration" : 0.0,
    "armRotation" : 0,
    "weaponRotation" : 0,
    "twoHanded" : true,

    "allowRotate" : false,
    "allowFlip" : false
    }
    }
    },
    "altAbility" : {
    "scripts" : ["/items/active/weapons/ranged/gunfire.lua"],
    "class" : "GunFire",
    "fireTime" : 0.156,
    "baseDps" : 2,
    "energyUsage" : 5,
    "fireType" : "auto",
    "inaccuracy" : 0.02,
    "projectileCount" : 1,
    "sounds" : {
    "fire" : [ "/sfx/orangegravgunfire.ogg" ]
    },
    "projectileType" : "squirtorangegrav",
    "projectileParameters" : {
    "speed" : 32
    },
    "stances" : {
    "idle" : {
    "armRotation" : 0,
    "weaponRotation" : 0,
    "twoHanded" : true,

    "allowRotate" : true,
    "allowFlip" : true
    },
    "fire" : {
    "duration" : 0,
    "armRotation" : 0,
    "weaponRotation" : 0,
    "twoHanded" : true,

    "allowRotate" : false,
    "allowFlip" : false
    },
    "cooldown" : {
    "duration" : 0.0,
    "armRotation" : 0,
    "weaponRotation" : 0,
    "twoHanded" : true,

    "allowRotate" : false,
    "allowFlip" : false
    }
    }
    },

    "builder" : "/items/buildscripts/buildunrandweapon.lua"
    }

    This is a gun that fires the blue and orange grav liquids from Frackin' Universe. It contains the functions of two guns in one, with the second being used by right click. The guns make their custom sounds on their own, but when crafted together into this gun, neither firing sound plays. I thought adding an empty sound bracket at the top would tell it that the sounds are elsewhere. It does the same thing with and without that empty bracket there. The gun fires as intended, and does not otherwise cause issues, it's just that the sounds are part of the flair of the weapon, and without them, much of the presentation is lost.

    EDIT: I will be releasing these and all my liquid guns to the public once the mod is done. There will be three packs, one for each mod covered by this one.
     

Share This Page