@pat1231 sorry idk how to quote xD
I fixed that issue based on what you said, found out some of the files didnt have the right name. However, now i get a new error when loading
Line 14, character 15
error CS1061: "Terraria.Projectile" does not contain a definition for 'name' and no extension method 'name' accepting a first argument of type "Terraria.Projectile" could be found (are you missing a using directive or an assembly reference?)
---Code---
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
public class MagicProjectile : ModProjectile
{
public override void SetDefaults()
{
projectile.name = ("Book Of Faults Projectile");
projectile.width = 40;
projectile.height = 40;
projectile.friendly = true;
projectile.penetrate = -1; //this is the projectile penetration
Main.projFrames[projectile.type] = 4; //this is projectile frames
projectile.hostile = false;
projectile.magic = true; //this make the projectile do magic damage
projectile.tileCollide = true; //this make that the projectile does not go thru walls
projectile.ignoreWater = true;
}
public override void AI()
{
//this is projectile dust
int DustID2 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y + 2f), projectile.width + 2, projectile.height + 2, mod.DustType("DustName"), projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 20, default(Color), 2.9f);
Main.dust[DustID2].noGravity = true;
//this make that the projectile faces the right way
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
projectile.localAI[0] += 1f;
projectile.alpha = (int)projectile.localAI[0] * 2;
if (projectile.localAI[0] > 130f) //projectile time left before disappears
{
projectile.Kill();
}
}
public override bool PreDraw(SpriteBatch sb, Color lightColor) //this is where the animation happens
{
projectile.frameCounter++; //increase the frameCounter by one
if (projectile.frameCounter >= 10) //once the frameCounter has reached 10 - change the 10 to change how fast the projectile animates
{
projectile.frame++; //go to the next frame
projectile.frameCounter = 0; //reset the counter
if (projectile.frame > 3) //if past the last frame
projectile.frame = 0; //go back to the first frame
}
return true;
}
}