using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace YOURMOD.Items
{
public class YOURITEM : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("ITEM NAME");
Tooltip.SetDefault("'TOOLTIP.'");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 4));
ItemID.Sets.AnimatesAsSoul[item.type] = true;
ItemID.Sets.ItemIconPulse[item.type] = true;
ItemID.Sets.ItemNoGravity[item.type] = true;
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.maxStack = 9999;
item.value = 0;
item.rare = 6;
}
}
}
Random question, please - What does the 5 in (5, 4) do? It's a four-frame thing.Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 4));
Code:using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; namespace YOURMOD.Items { public class YOURITEM : ModItem { public override void SetStaticDefaults() { DisplayName.SetDefault("ITEM NAME"); Tooltip.SetDefault("'TOOLTIP.'"); Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 4)); ItemID.Sets.AnimatesAsSoul[item.type] = true; ItemID.Sets.ItemIconPulse[item.type] = true; ItemID.Sets.ItemNoGravity[item.type] = true; } public override void SetDefaults() { item.width = 20; item.height = 20; item.maxStack = 9999; item.value = 0; item.rare = 6; } } }
If this is a soul this should work
Random question, please - What does the 5 in (5, 4) do? It's a four-frame thing.
I think its , how big one animation is, in pixelsRandom question, please - What does the 5 in (5, 4) do? It's a four-frame thing.
Im not completly surePixels ? really wtf , that sprite is 22x122 pixels, 22x30 for every frame
I know this thread is very old and I'm sorry for posting on it, but if anyone is looking at this for info in the present, the 5 is the amount of ticks per frame, and the 4 is the amount of frames in the animation. Hope this helps!Random question, please - What does the 5 in (5, 4) do? It's a four-frame thing.
Thank you!I know this thread is very old and I'm sorry for posting on it, but if anyone is looking at this for info in the present, the 5 is the amount of ticks per frame, and the 4 is the amount of frames in the animation. Hope this helps!
Hm isn't 5 is speed in ticks and 4 is frames in animation? And sorry for necroing.I know this thread is very old and I'm sorry for posting on it, but if anyone is looking at this for info in the present, the 5 is the amount of ticks per frame, and the 4 is the amount of frames in the animation. Hope this helps!