TheBlazingTopHat
Steampunker
I've been trying to make a Daybreak-like item that you can throw and it won't consume it. Please can I have some help? I've been following the GitHub code for a javelin, so this is my code so far.
Thanks for any help.using ourmod.Projectiles;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace ourmod.Items.Weapons
{
public class ExampleJavelin : ModItem
{
public override void SetDefaults() {
// Alter any of these values as you see fit, but you should probably keep useStyle on 1, as well as the noUseGraphic and noMelee bools
item.shootSpeed = 10f;
item.damage = 500;
item.knockBack = 5f;
item.useStyle = 1;
item.useAnimation = 25;
item.useTime = 25;
item.width = 30;
item.height = 30;
item.maxStack = 1;
item.rare = -12;
item.consumable = false;
item.noUseGraphic = true;
item.noMelee = true;
item.autoReuse = true;
item.thrown = true;
item.UseSound = SoundID.Item1;
item.value = Item.sellPrice(silver: 5);
// Look at the javelin projectile for a lot of custom code
// If you are in an editor like Visual Studio, you can hold CTRL and Click ExampleJavelinProjectile
item.shoot = mod.ProjectileType<ExampleJavelinProjectile>();
}
}
}