I would do that, but, I don't really have the time to learn a lot about C#
But if I
did have the time, I would willingly take your advice.
Ok, I figured out what you meant by that (it was incredibly simple
.)
But now that I've changed:
public override bool Autoload(ref string name, ref string texture)
To
mod.Autoload
It now gives me this error:
c:\Users\Gyderian\Documents\My Games\Terraria\ModLoader\Mod Sources\MyFirstMod\Projectiles\CelestialFuryProjectile.cs(29,9) : error CS1519: Invalid token '{' in class, struct, or interface member declaration
c:\Users\Gyderian\Documents\My Games\Terraria\ModLoader\Mod Sources\MyFirstMod\Projectiles\CelestialFuryProjectile.cs(30,27) : error CS1519: Invalid token '=' in class, struct, or interface member declaration
c:\Users\Gyderian\Documents\My Games\Terraria\ModLoader\Mod Sources\MyFirstMod\Projectiles\CelestialFuryProjectile.cs(30,35) : error CS1519: Invalid token ')' in class, struct, or interface member declaration
c:\Users\Gyderian\Documents\My Games\Terraria\ModLoader\Mod Sources\MyFirstMod\Projectiles\CelestialFuryProjectile.cs(30,46) : error CS1519: Invalid token '(' in class, struct, or interface member declaration
c:\Users\Gyderian\Documents\My Games\Terraria\ModLoader\Mod Sources\MyFirstMod\Projectiles\CelestialFuryProjectile.cs(30,54) : error CS1519: Invalid token ')' in class, struct, or interface member declaration
c:\Users\Gyderian\Documents\My Games\Terraria\ModLoader\Mod Sources\MyFirstMod\Projectiles\CelestialFuryProjectile.cs(30,76) : error CS1519: Invalid token ',' in class, struct, or interface member declaration
c:\Users\Gyderian\Documents\My Games\Terraria\ModLoader\Mod Sources\MyFirstMod\Projectiles\CelestialFuryProjectile.cs(30,85) : error CS1519: Invalid token ')' in class, struct, or interface member declaration
c:\Users\Gyderian\Documents\My Games\Terraria\ModLoader\Mod Sources\MyFirstMod\Projectiles\CelestialFuryProjectile.cs(30,107) : error CS1519: Invalid token ')' in class, struct, or interface member declaration
c:\Users\Gyderian\Documents\My Games\Terraria\ModLoader\Mod Sources\MyFirstMod\Projectiles\CelestialFuryProjectile.cs(33,1) : error CS1022: Type or namespace definition, or end-of-file expected
(The end-of-file error I've tried to fix but nothing that has usually worked from me has worked this time.)
Here is my code:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
namespace MyFirstMod.Projectiles
{
class CelestialFuryProjectile : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Celestial Fury Projectile";
projectile.width = 48;
projectile.height = 48;
projectile.friendly = true;
projectile.melee = true;
projectile.tileCollide = true;
projectile.penetrate = 3;
projectile.timeLeft = 200;
projectile.light = 1f;
projectile.ignoreWater = true;
}
mod.Autoload
{
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
}
}
}