tModLoader v2024.11
A mod to make and play Terraria mods
ItemUseStyleID Class Reference

Assign Item.useStyle to one of these to give your item an animation while in use. The Use Style IDs wiki pagehas examples and animations of each of these use styles.
If none of these animations match what you want, consider making the animation a behavior of a held projectile or use the ModLoader.ModItem.UseStyle hook to implement a custom animation. More...

Static Public Attributes

const int DrinkLiquid = 9
 Item is brought in front of player and rotated towards player.
Used by potions, drinks, flasks, and hair dyes.
 
const int DrinkLong = 6
 Item is brought in front of player and rotated towards player.
Used by Recall Potion and Potion of Return
 
const int DrinkOld = 7
 Unused
 
const int EatFood = 2
 Eating or using
Used by food
 
const int GolfPlay = 8
 Item is swung like a golf club.
Used by golf clubs.
 
const int Guitar = 12
 Used by guitar-shaped instruments
 
const int HiddenAnimation = 10
 
const int HoldUp = 4
 Item is held up.
Used for items such as mana/life crystals, life fruit, magic mirrors, and summoning items
 
const int MowTheLawn = 11
 Used by Lawn Mower
 
const int None = 0
 
const int RaiseLamp = 14
 Item is raised high by off hand.
Used by Nightglow.
 
const int Rapier = 13
 Item is thrust in any direction towards the mouse. Used by Shortswords
 
const int Shoot = 5
 Item is held in front of player pointing towards mouse. Item sprite should be oriented horizontally with handle at left and muzzle end at right. Set Item.staff[Type] = true; in SetStaticDefaults if the weapon sprite is oriented like a staff (handle at bottom left, end at top right).
Used by items such as guns, spell books, flails, yoyos, and spears
 
const int Swing = 1
 Item is swung in an overhead arch.
Used for many sword weapons, block placement, etc.
 
const int Thrust = 3
 Item is thrust horizontally.
Use by ItemID.Umbrella and ItemID.TragicUmbrella
 

Detailed Description

Assign Item.useStyle to one of these to give your item an animation while in use. The Use Style IDs wiki page

has examples and animations of each of these use styles.
If none of these animations match what you want, consider making the animation a behavior of a held projectile or use the ModLoader.ModItem.UseStyle hook to implement a custom animation.