• Journey's End on PC - Find info here and here. Please report bugs and issues for PC 1.4 and 1.4.1 to Re-Logic here.
  • Journey's End on Mobile - Find info here. Report bugs for Mobile 1.4 to DR Studios at this link and give as much detail as possible.
  • 1.4 will bring many changes to the PC version. We strongly advise making plans to back up your worlds and players prior to updating your game. More details here.
  • Console and Switch - The latest news can be found here. To report a bug, please use this link.

tModLoader Help with an NPC shooting projectiles.

TheDarkLitten

Steampunker
So, I'm making a custom boss in tmodloader, but whenever it shoots, the projectile just stays put and doesn't fire at the player. I really need help.
public override void AI() {
if (AI_State == State_Flutter) {
AI_Timer++;
npc.TargetClosest(true);
if (AI_Timer >= 50) {
int damage = npc.damage / 2;
int proj = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModContent.ProjectileType<FireOrbHostile>(), damage, 0, Main.myPlayer);
AI_State = State_Flutter;
AI_Timer = 0;
}
}
}
I can put all my ModNPC file coding here if requested.
 
Top Bottom