AxerTheAxe
Skeletron Prime
Hi! I have been looking everywhere for this but have not found it. I made a modded projectile and ammo that I want to shoot out of the vanilla snowball cannon. How do I do this? Thanks!
when making modded ammo, you usually have a thing that says item.ammo and you should try putting AmmoID.SnowballHi! I have been looking everywhere for this but have not found it. I made a modded projectile and ammo that I want to shoot out of the vanilla snowball cannon. How do I do this? Thanks!
public class SnowballCannon : GlobalItem
{
public override void SetDefaults(Item item)
{
if (item.type == ItemID.SnowballCannon)
{
item.ammo = mod.ItemType("IceBall");
item.shoot = mod.ProjectileType("IceBallProjectile");
}
}
}
item.ammo = AmmoID.Snowball;
item.shoot = ModContent.ItemType<IceBallProjectile>();
In your IceBall item, in SetDefaults
Code:item.ammo = AmmoID.Snowball; item.shoot = ModContent.ItemType<IceBallProjectile>();
item.shoot = ModContent.ProjectileType<IceBallProjectile>();
Just woke up today and realized I told you to put ItemType instead of ProjectileType.
So tryitem.shoot = ModContent.ProjectileType<IceBallProjectile>();
public class SnowballCannon : GlobalItem
{
public override void SetDefaults(Item item)
{
if (item.type == ItemID.SnowballCannon)
{
item.ammo = mod.ItemType("IceBall");
item.shoot = mod.ProjectileType("IceBallProjectile");
}
}
}
I see what you are trying to do but I have no idea how to work this way when making ammo. so I'll let you see how my ammo works to try and help you.
public class ChlarospharicBullet : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("ChlarospharicBullet");
Tooltip.SetDefault("would it be called chlarosphic or chlarosphine?");
}
public override void SetDefaults()
{
item.damage = 45;
item.ranged = true;
item.width = 8;
item.height = 8;
item.maxStack = 9999;
item.consumable = true;
item.knockBack = 16f;
item.value = 1;
item.rare = 2;
item.shoot = mod.ProjectileType("ChlarospharicBullet"); // replace with your projectile
item.shootSpeed = 20f;
item.ammo = AmmoID.Bullet; // replace with snowball