Draymien
Skeletron Prime
(Idk if im using the correct thread thing, I hope so)
I would like to start off by telling you that you are about to see the worst code that your eyes have been forced to appreciate.
Anyway, so ill just get to the point, I am trying to make a boss with 6 frames, But it is only showing the first frame, Yeah I really don't know how to explain it. ill just give you my code and stuff
Your eyes are probably bleeding after seeing my code, I am really sorry, im just bad at coding : [
Anyway here is the texture
(That is DEFINETELIY not an official texture, I'm just using it for testing purposes)
If anyone knows how to fix that, please reply, that would help me a lot.
I would like to start off by telling you that you are about to see the worst code that your eyes have been forced to appreciate.
Anyway, so ill just get to the point, I am trying to make a boss with 6 frames, But it is only showing the first frame, Yeah I really don't know how to explain it. ill just give you my code and stuff
C#:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using MasterPiece;
using MasterPiece.Dusts;
using MasterPiece.Projectiles;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.IO;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace MasterPiece.NPCs.MechanicalBeast
{
[AutoloadBossHead]
public class MechanicalBeast : ModNPC
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Mechanical Beast");
Main.npcFrameCount[npc.type] = 6;
}
public override void SetDefaults()
{
npc.aiStyle = 5;
npc.lifeMax = 1000;
npc.damage = 5;
npc.defense = 15;
npc.knockBackResist = 0f;
npc.width = 100;
npc.height = 100;
npc.value = Item.buyPrice(0, 20, 0, 0);
npc.npcSlots = 15f;
npc.boss = true;
npc.lavaImmune = true;
npc.noGravity = true;
npc.noTileCollide = true;
npc.HitSound = SoundID.NPCHit1;
npc.DeathSound = SoundID.NPCDeath1;
npc.buffImmune[144] = true;
music = MusicID.Boss2;
}
//public override void OnSpawn() //optional
//{
//}
public override void AI() //this is where you program your AI
{
}
//public override void HitEffect(int hitDirection, double damage, bool isDead) //This is for whenever your boss gets hit by an attack. Create dust or gore.
//{
//}
//public override void SelectFrame(int frameSize) //This is for animating your boss, such as how Queen Bee changes between charging or hovering images, or how Pumpking rotates its face.
//{
//}
//public override void SetupLootRules(NPC unused) //this is what makes special things happen when your boss dies, like loot or text
//{
}
}
Anyway here is the texture
(That is DEFINETELIY not an official texture, I'm just using it for testing purposes)
If anyone knows how to fix that, please reply, that would help me a lot.