tModLoader How would I make a mod mob shoot vanilla projectiles?

creepi17

Terrarian
Hello there! I've been working on a mod lately and I need help. You can see from the title from the post what I need help for.

this is my mod script:
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;

namespace LunskeMod.NPCs.NormalNPCs
{
public class VortexEye : ModNPC
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Vortex Eye");
}

public override void SetDefaults()
{
npc.width = 18;
npc.height = 24;
npc.damage = 300;
npc.defense = 80;
npc.lifeMax = 3000;
npc.HitSound = SoundID.NPCHit2;
npc.DeathSound = SoundID.NPCDeath2;
npc.value = 150f;
npc.knockBackResist = 0.25f;
npc.aiStyle = 2;
Main.npcFrameCount[npc.type] = Main.npcFrameCount[NPCID.DemonEye];
aiType = NPCID.DemonEye;
animationType = NPCID.DemonEye;
}

public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
return SpawnCondition.ZoneTowerVortex.Chance * 0.5f;
}

public override void NPCLoot()
{
if (Main.rand.Next(1, 2) == 1)
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("LightLens"), Main.rand.Next(5, 10));
}
}
}
 
Back
Top Bottom