tAPI UseAnimation priority over UseTime?

matfoxbidule

Official Terrarian
Hi, I am fairly new to modding and have started making a sword, which I would like to have different UseAnimation and UseTime, but in game it seems to only use UseAnimation.
Here is my code:
{
"displayName": "(none yet)",
"size": [64,64],
"maxStack": 1,
"value": [0,4,60,0],
"rare": 5,
"useStyle": 1,
"useTime": 33,
"useAnimation": 11,
"damage": 63,
"knockback": 7,
"useSound": 1,
"autoReuse": true,
"useTurn": true,
"melee": true,


"recipes":
[{
"items": { "Dirt Block": 12 },
"tiles": [ "Mythril Anvil", "Orichalcum Anvil" ],
"creates": 1
}]
}
Am I doing something wrong? Thanks in advance!
 
Hi, I am fairly new to modding and have started making a sword, which I would like to have different UseAnimation and UseTime, but in game it seems to only use UseAnimation.
Here is my code:
{
"displayName": "(none yet)",
"size": [64,64],
"maxStack": 1,
"value": [0,4,60,0],
"rare": 5,
"useStyle": 1,
"useTime": 33,
"useAnimation": 11,
"damage": 63,
"knockback": 7,
"useSound": 1,
"autoReuse": true,
"useTurn": true,
"melee": true,


"recipes":
[{
"items": { "Dirt Block": 12 },
"tiles": [ "Mythril Anvil", "Orichalcum Anvil" ],
"creates": 1
}]
}
Am I doing something wrong? Thanks in advance!
The useTime determines how long it takes to use an item while useAnimation determines how long the animation is. So, for example, if you have useTime and useAnimation set to both 11, it takes 11 ticks (about 11/60 of a second) to use the item and animate it. You can use this to your advantage also, as if you have your useTime lower than your useAnimation, the item is used multiple times in that one animation, for example if you were to have useTime set to 5 and useAnimation set to 15, it will use the item 3 times in that one animation.
 
I also tried a sword with higher useTime than useAnimation and it still didn't use it multiple times. Here is its code:
{
"displayName": "(Also no name)",
"size": [64,64],
"maxStack": 1,
"value": [0,1,8,0],
"rare": 3,
"useStyle": 1,
"useAnimation": 38,
"useTime": 19,
"damage": 30,
"knockback": 2,
"useSound": 1,
"autoReuse": true,
"useTurn": true,
"melee": true,
}
 
I also tried a sword with higher useTime than useAnimation and it still didn't use it multiple times. Here is its code:
{
"displayName": "(Also no name)",
"size": [64,64],
"maxStack": 1,
"value": [0,1,8,0],
"rare": 3,
"useStyle": 1,
"useAnimation": 38,
"useTime": 19,
"damage": 30,
"knockback": 2,
"useSound": 1,
"autoReuse": true,
"useTurn": true,
"melee": true,
}
Well, the sword animation is only shown once if you have the useTime lower than the useAnimation, but the sword is definitely used mutliple times in that one swing.
 
And so, do you know how I could make it so that when the first sword is used, there is a cooldown until it can be used again?
 
Back
Top Bottom