Sin Costan
Eye of Cthulhu
1. Try fooling around withHello, I am attempting to make a very weak pickaxe with limited range. I've got it mostly working but still have a few stumbling blocks...
1. I want this tool to only reach one or two blocks away. I see no property to directly set this so I assumed it is based on the item.width and height forming a hitbox. Several of the vanilla picks have modified range so I know it is possible. What am I missing?
2. I want the tool to animate like a spear (it is a sharp stick after all) but when I set it up to "shoot" I lose the pick functionality all together. Any suggestions?
Code:
Code:public class SharpStick : ModItem { public override void SetDefaults() { item.name = "Sharp Stick"; item.width = 8; item.height = 8; item.maxStack = 1; item.rare = 5; item.toolTip = "This sharp stick is really useful."; item.toolTip2 = "You can dig in the dirt with it and poke stuff."; item.useStyle = 1; item.useTime = 24; item.useAnimation = item.useTime + 4; item.pick = 4; // good for dirt and not much else :D Too low, even dirt won't budge. item.damage = 2; item.melee = true; item.knockBack = 2; item.autoReuse = false; item.scale = 1f; item.useTurn = true; } }
Code:
item.tileBoost
It's an integer.
2. Spear is actually a projectile instead of drawing the item, I think there's an example spear in the ExampleMod in the tModLoader github. Look for the item and the projectile for the spear.