Resolved Soul Animation Code

BeastPlayer75

Terrarian
So I am new to making mods and I am just wondering how I get a sprite animation for a soul (like a soul of light) to work, this is my code:
Code:
using Microsoft.Xna.Framework;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.DataStructures;

namespace ProjectSolidification.Items
{
    public class SoulofBlight : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Soul of Blight");
            Tooltip.SetDefault("'The essence of infected creatures'");
        }
        public override void SetDefaults()
        {
            item.width = 11;
            item.height = 11;
            item.value = 10000;
            item.rare = -9;
            item.maxStack = 999;
            ItemID.Sets.ItemNoGravity[item.type] = true;
        }
        public override DrawAnimation GetAnimation()
        {
            return new DrawAnimationVertical(11, 4);
        }
        public override Color? GetAlpha(Color lightColor)
        {
            return Color.White;
        }
        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.SoulofFright, 3);
            recipe.AddIngredient(ItemID.SoulofSight, 3);
            recipe.AddIngredient(ItemID.SoulofMight, 3);
            recipe.SetResult(this, 3);
            recipe.AddRecipe();
        }
    }
}
My issue is the part with "GetAnimation" as it is coming up saying "'SoulofBlight.GetAnimation()': no sutiable method found to override", I've looked everywhere for fixes but can't find one
 
Last edited:
That code seems outdated, whereever you got it from.
Examplemod (click here) has a working soul. You don't need anything beyond line 30 (except closing brackets and the PostUpdate hook)
 
That code seems outdated, whereever you got it from.
Examplemod (click here) has a working soul. You don't need anything beyond line 30 (except closing brackets and the PostUpdate hook)
Thank you! I thought it was outdated because a lot of it wasn't being recognised so I had to fix it but this just made everything better. Thanks
 
Back
Top Bottom