• Journey's End on PC - Find info here and here. Please report bugs and issues for PC 1.4 and 1.4.1 to Re-Logic here.
  • Journey's End on Mobile - Find info here. Report bugs for Mobile 1.4 to DR Studios at this link and give as much detail as possible.
  • 1.4 will bring many changes to the PC version. We strongly advise making plans to back up your worlds and players prior to updating your game. More details here.
  • Console and Switch - The latest news can be found here. To report a bug, please use this link.

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?
 

Douwe2000

Terrarian
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();

}
}
}
 

michaelsoftman

Terrarian
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.
 
Top Bottom