desmondh2o🌳
Steampunker
I'm making a bow that using cactus as ammo, how would one make cactus into ammo and how would the code for that work and go? If anyone has any answers, that would be very appreiciated.
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace ModName.Fileblablabla
{
public class ModifyDefaults : GlobalItem
{
public override void SetDefaults(Item item)
{
if(item.type == ItemID.Cactus)
{
item.ammo = AmmoID.Bullet;
item.shoot = ModContent.ProjectileType<customCactusProjectile>();
}
}
}
}