use MeleeEffects in your weapon file. This is what I use for some purple dust on my weapon:
public override void MeleeEffects(Player player, Rectangle hitbox){
if (Main.rand.NextFloat() < 0.1) { //10% chance each frame to spawn dust
Dust.NewDust(new...
I have another question on top of this: How do i completely turn off pitch variance for a custom sound? I've tried .WithPitchVariance(0f), which doesn't seem to work.
You would probably do this in a ModPlayer class. You should carefully read over what ExampleMod tells you in its SimpleModPlayer file, but what you basically do is this:
Create a public variable in the ModPlayer class that your accessory changes. Say you make it a bool titled knockbackAccessory...
I'd like to have my sword swing fast with a delay between each swing. My assumption was that I could have useTime be longer than useAnimation to achieve this effect, but that doesn't seem to be the case. I've also tinkered around with reuseDelay to no avail. Any suggestions?
UPDATE: I've since resolved this issue on my own. Instead of using item.buffType = ModContent.BuffType<GhostbladeBuff>();, I'm using item.buffType = mod.BuffType"GhostbladeBuff". This allows me to use item.buffType = mod.BuffType""; to unassign the buff, fixing my issue.
Hi everybody! Just looking for a bit of advice. I noticed when messing around with item.buffType there are several ways to assign the same buff. Which way is best for which situation? I've put some examples down below.
item.buffType = mod.BuffType("GhostbladeBuff"); //can also use...
Hey! New to modding, and I'm posting here with the hope that somebody can help me with my code. I want my weapon to give the player a buff when they right click with it. The issue is that once the player right clicks with the sword, item.buffType is assigned to the entire item. From that point...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.