isaac bunny man
Terrarian
I'm currently trying to make a couple of true melee weapons, but I kinda... don't know how to make them do what I want them to do?
Does anyone know how to make my sword spawn Nightglow projectiles on hit?
(oh yeah and "nightblade" is a placeholder name)
C#:
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace funnymodthing123.Content.Items
{
// This is a basic item template.
// Please see tModLoader's ExampleMod for every other example:
// https://github.com/tModLoader/tModLoader/tree/stable/ExampleMod
public class NightBlade : ModItem
{
// The Display Name and Tooltip of this item can be edited in the 'Localization/en-US_Mods.funnymodthing123.hjson' file.
public override void SetDefaults()
{
Item.damage = 75;
Item.DamageType = DamageClass.Melee;
Item.width = 64;
Item.height = 64;
Item.useTime = 25;
Item.useAnimation = 25;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 8;
Item.value = Item.buyPrice(gold: 8);
Item.rare = ItemRarityID.Lime;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
}
public override void AddRecipes()
{
Recipe recipe1 = CreateRecipe();
recipe1.AddIngredient(ItemID.FairyQueenMagicItem, 1);
recipe1.AddIngredient(ItemID.PearlwoodSword, 1);
recipe1.AddTile(TileID.MythrilAnvil);
recipe1.Register();
}
}
}
(oh yeah and "nightblade" is a placeholder name)