Search results for query: *

  1. A

    tModLoader Official tModLoader Help Thread

    I'm trying to make a prefix that gives the weapon lifesteal I want a weapon that has this prefix to have lifesteal. I tried things like writing OnHitNPC in the file but it gives error. Can anyone tell me what change to make to the code so it works as intended please. using Terraria; using...
  2. A

    tModLoader Official tModLoader Help Thread

    I had this issue before and someone helped me on that, change ur code to : public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { Player player = Main.player[projectile.owner]; int amountToHeal = damage / 10; // Heal tenth...
  3. A

    tModLoader Official tModLoader Help Thread

    Tysm it worked! now the next thing I'm trying to make is an accessory that gives life steal on all your damages when equipped, like the spectre hood set bonus, but I want it to work on all damage types and I want to customize the percentage of lifesteal, I tried ghostheal but idk if there are...
  4. A

    tModLoader Official tModLoader Help Thread

    I'm trying to make a projectile that does lifesteal, but it says no suitable method found to override, if I remove the player player and the statlife line it works fine and the projectile inflicts ichor, but how can i make it do lifesteal as well? public override void OnHitNPC(Player Player...
Back
Top Bottom