Deathmare87
Terrarian
Im getting this error
"Uses(42,78) : error CS0120: An object reference is required for the non-static field, method, or property 'Terraria.Entity.Center.get'"
with these two lines from the homing projectile code
(same error for both)
float shootToY = target.position.Y - NPC.Center.Y;
float distance = (float)System.Math.Sqrt((double)(shootToX * shootToX + shootToY * shootToY));
Edit: I changed the NPC.Center to target.Center, but now the projectiles just fire straight up
"Uses(42,78) : error CS0120: An object reference is required for the non-static field, method, or property 'Terraria.Entity.Center.get'"
with these two lines from the homing projectile code
(same error for both)
float shootToY = target.position.Y - NPC.Center.Y;
float distance = (float)System.Math.Sqrt((double)(shootToX * shootToX + shootToY * shootToY));
Edit: I changed the NPC.Center to target.Center, but now the projectiles just fire straight up
Last edited: