tModLoader Daybreak-like item help?

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.
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>();
}
}
}
Thanks for any help.
 
Could you be more specific about what exactly you want the weapon to do when it's finished, what it does at the moment, and what part of the implementation you need help with?
 
Sorry for the very late reply, but I basically want the Daybreak, just with a different sprite. I raged and decided to temporarily make it a sword, but any help to what I'm trying to achieve is greatly appreciated.
 
The problem is that your Javelin projectile either has a different name than 'ExampleJavelinProjectile' or that it doesnt exist.
If you would want the projectile to act like the daybreak you will have to code something yourself.
But you can just insert this in your projectile code (In the SetDefaults hook): aiType = ProjectileID.Daybreak;
Im not sure if thats the projectiles name but you could just look it up.
 
Back
Top Bottom