Disable arrow drops when shot

Douwe2000

Terrarian
Hey guys I'm currently creating a quiver for vanilla arrows which is working fine but

When I shoot an arrow it sometimes still drops a arrow
but because the onconsume = false;
they can shoot the arrows on the ground without using any arrows and pick them off the ground after they shot them
I don't want that because they can dupe arrows that way

How would I disable or interfere with arrows dropping when they hit a solid block, and do I have to change it's item type or projectile type to disable it?
Are there multiple ways to do this, is there an option to disable this or do I have to actually kill a dropping arrow when it drops?
 

So I've made a simple script for the quiver but how would I disable the projectile dropping when using CloneDefaults and not an projectile scene?
Here's my script:


using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Pouches_and_Quivers.items.quivers
{
public class Frostburn_Quiver : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("Pouches and Quivers");
DisplayName.SetDefault("Frostburn quiver");
}

public override void SetDefaults()
{
item.CloneDefaults(ItemID.FrostburnArrow);
item.maxStack = 1;
item.consumable = false; //You need to set the item consumable so that the ammo would automatically consumed
item.value = item.value = Item.sellPrice(0, 1, 19, 88); //The speed of the projectile
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.FrostburnArrow, 3996);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this, 1);
recipe.AddRecipe();

}
}
}
 
You'd need to make your own custom projectile, as the part of code that controls that setting is in the projectile code and not the item code.
 
Back
Top Bottom