Can I make it so whenever I use a weapon it uses a different texture from the one in my inventory?

kajuspleitay

Terrarian
Making a baseball bat. And want to use the useStyle of golf clubs. But the texture has to be rotated for it to look good. But it looks bad in my inventory. I want for it to use a separate texture for when it is swung then when it is in my inventory.
Some example code, an explanation or a different method would be much appreciated! <3:naughty:
- Code for notice -
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using Terraria.GameContent.Creative;
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace CoolMod.Items.Weapons.Melee
{
internal class BasicBaseBallBat : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Basic BaseBall Bat");
Tooltip.SetDefault("The Golfers Second Favorite Sport\nCatch This Chuckle Nuts!\nShoot A Melee Damage BaseBall"); //\nTemporary Texture
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
}

public override void SetDefaults()
{
//Hitbox
Item.width = 64;
Item.height = 64;

//Use And Animation Style
Item.useStyle = ItemUseStyleID.GolfPlay;
Item.useTime = 50;
Item.useAnimation = 50;
Item.useTurn = true;

//Damage Values
Item.DamageType = DamageClass.Melee;
Item.damage = 71;
Item.knockBack = 2f;
Item.crit = 12;

//Misc
Item.value = Item.buyPrice(gold: 2, silver: 87, copper: 34);
Item.rare = ItemRarityID.LightRed;
}
//todo list (For Me Not For Forum)
//Add Ball and Sound
//Ask Forums About How To Change Textures during use
}
}
 

Attachments

  • New Piskel (8).png
    New Piskel (8).png
    567 bytes · Views: 32
  • New Piskel (8).png
    New Piskel (8).png
    588 bytes · Views: 27
Back
Top Bottom