tModLoader how do i make an accessory give me immunity to a debuff from another mod?

joj

Terrarian
i'm currently using
Code:
public override void UpdateAccessory(Player player, bool hideVisual) {
            player.buffImmune[BuffID.AbilityCooldown] = true;
but it's telling me that BuffID doesnt have a definition for AbilityCooldown. how do i stop this from happening?
 
I think you have to put the dependency to the mod you want to reference in the top part of your document, where u have "using Terraria;" and what not...
 
i put it as "using [mod];" and "using [mod].id;" but it says "the type or namespace name '[mod]' could not be found.
 
Maybe you have to use the exact name space?
using terraria.modloader.mods.[mod] or even terraria.modloader.mods.[mod].debuffs/buffs

Edit: I just found this, maybe look under "Call" or "weak referencing"

 
Last edited:
Back
Top Bottom