Modding Help throwing dagger / knife

Discussion in 'Starbound Modding' started by nightmare780, Dec 12, 2020.

Tags:
  1. nightmare780

    nightmare780 Void-Bound Voyager

    does someone know how to make a dagger like the nebulox's (the forge blade dancer), but also with the ability to throw that weapon like a boomerang or etc, please give me an example
     
  2. supredude11

    supredude11 Void-Bound Voyager

    all you have to do is have the throwing weapon use a projectile using the boomerang script.

    item:
    Code:
    {
      "itemName" : "holycross",
      "rarity" : "rare",
      "category" : "throwableItem",
      "inventoryIcon" : "cross.png",
      "image" : "cross.png",
      "shortdescription" : "Throwing Cross",
      "description" : "A throwing cross, for chopping things down at a distance.",
     
      "animation" : "boomerang.animation",
      "animationParts" : {
        "boomerang" : "boomerang.png"
      },
     
      "ammoUsage" : 1,
    
      "edgeTrigger" : true,
      "windupTime" : 0.0,
      "cooldown" : 0.9,
      "fireOffset" : [1.25, 0.5],
    
      "projectileType" : "boomerang",
      "projectileConfig" : {
        "power" : 30,
        "knockback" : 20,
       
        "ignoreTerrain" : false,
        "controlForce" : 80,
        "pickupDistance" : 1.0,
        "snapDistance" : 4.0,
       
        "periodicActions" : [
          {
            "time" : 0,
            "repeat" : false,
            "action" : "sound",
            "options" : [ "/sfx/projectiles/throw_item.ogg" ]
          }
        ]
      }
    }
    projectile:
    Code:
    {
      "projectileName" : "boomerang",
      "image" : "boomerang.png",
      "animationCycle" : 0.5,
      "frameNumber" : 8,
      "damageKindImage" : "icon.png",
      "pointLight" : false,
      "flippable" : false,
      "orientationLocked" : true,
      "actionOnReap" : [ ],
      "statusEffects" : [ ],
      "damagePoly" : [[-8, 4], [-4, 8], [4, 8], [8, 4], [8, -4], [4, -8], [-4, -8], [-8, -4]],
      "power" : 5.0,
      "speed" : 60,
      "damageKind" : "hammer",
      "physics" : "laser",
      "bounces" : -1,
      "piercing" : true,
      "timeToLive" : 5,
    
      "persistentAudio" : "/sfx/projectiles/boomerang2.ogg",
    
      "scripts" : [ "/scripts/projectiles/boomerangprojectile.lua" ]
    }
     
  3. nightmare780

    nightmare780 Void-Bound Voyager

    thanks a lot for the example. but can the dagger still be used at close range and have the alt / shift ability to throw the dagger like a throwing knife / bomerang ? (sorry for late)
     

Share This Page