• Journey's End on PC - Find info here and here. Please report bugs and issues for PC 1.4 and 1.4.1 to Re-Logic here.
  • Journey's End on Mobile - Find info here. Report bugs for Mobile 1.4 to DR Studios at this link and give as much detail as possible.
  • 1.4 will bring many changes to the PC version. We strongly advise making plans to back up your worlds and players prior to updating your game. More details here.
  • Console and Switch - The latest news can be found here. To report a bug, please use this link.

PC Spriting Help

trainhead1201

Terrarian
So I'm creating a mod with a musket-type weapon. However, in game, the player is holding it from the very edge of it, which looks unrealistic. What is going on here? I also have the files below if you want to take a look at it.
 

Attachments

  • WhitworthRifle.png
    WhitworthRifle.png
    423 bytes · Views: 18
  • WhitworthRifle.cs
    1.4 KB · Views: 19

Red 4

Terrarian
Code:
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using trainheadexpansion.Items.Materials;
 
namespace trainheadexpansion.Items.Weapons
{
    public class WhitworthRifle : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Whitworth Rifle");
            Tooltip.SetDefault("Slow, but powerful.");
        }
        public override void SetDefaults()
        {
            item.damage = 36;
            item.ranged = true;
            item.width = 54;
            item.height = 18;
            item.crit = 5;
            item.useTime = 37; //
            item.useAnimation = 37; //
            item.useStyle = 5;
            item.noMelee = true;
            item.knockBack = 5;
            item.value = 10000;
            item.rare = 3;
            item.UseSound = SoundID.Item11;
            item.autoReuse = true;
            item.shoot = 10;
            item.shootSpeed = 16f;
            item.useAmmo = 97;
        }
               public override Vector2? HoldoutOffset()
        {
            return new Vector2(0, 0); //just mess around with these zeros untill it looks good
        }
 
        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(164, 1);
            recipe.AddIngredient(null, "HoneyedBar", 10);
            recipe.AddTile(TileID.Anvils);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}
[doublepost=1561190715,1561190655][/doublepost]just swap it with that should work or just add
Code:
               public override Vector2? HoldoutOffset()
        {
            return new Vector2(0, 0); //justg mess around with these zeros untill it looks good
        }
under the } thats under item.useAmmo
 
Top Bottom