How can I code two projectiles two shoot at once with my weapon?

diet dirt

Empress of Light
I have currently tried to create a weapon that has star fury projectiles fall from the sky, and star wrath projectiles shoot from the sword when swung. The star fury projectiles fall from the sky, the star wrath projectiles do not shoot from the weapon. Any help would be appreciated.

using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Altered.Items.Weapons
{
public class GalaxysEdge : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("A blade infused with the power of the galaxy");
}

public override void SetDefaults()
{
item.damage = 340;
item.melee = true;
item.width = 40;
item.height = 40;
item.useTime = 15;
item.useAnimation = 16;
item.useStyle = 1;
item.knockBack = 6;
item.value = 500000;
item.rare = 10;
item.UseSound = SoundID.Item105;
item.autoReuse = true;
item.useTurn = true;
item.shoot = mod.ProjectileType("Projectile3");
item.shootSpeed = 15f;
}

public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
item.shoot = mod.ProjectileType("Projectile2");
item.shootSpeed = 15f;
Vector2 target = Main.screenPosition + new Vector2((float)Main.mouseX, (float)Main.mouseY);
float ceilingLimit = target.Y;
if (ceilingLimit > player.Center.Y - 200f)
{
ceilingLimit = player.Center.Y - 200f;
}
for (int i = 0; i < 3; i++)
{
position = player.Center + new Vector2((-(float)Main.rand.Next(0, 401) * player.direction), -600f);
position.Y -= (100 * i);
Vector2 heading = target - position;
if (heading.Y < 0f)
{
heading.Y *= -1f;
}
if (heading.Y < 20f)
{
heading.Y = 20f;
}
heading.Normalize();
heading *= new Vector2(speedX, speedY).Length();
speedX = heading.X;
speedY = heading.Y + Main.rand.Next(-40, 41) * 0.02f;
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage * 2, knockBack, player.whoAmI, 0f, ceilingLimit);
}
return false;
}
 
And if anyone is wondering, "projectile2" is the star fury projectile, while "projectile3" is the star wrath projectile
 
Back
Top Bottom