For one you can add the following code to the SetDefaults function of your item:
Code:ItemID.Sets.ItemNoGravity[item.type] = true;
Thank you
For one you can add the following code to the SetDefaults function of your item:
Code:ItemID.Sets.ItemNoGravity[item.type] = true;
Could you show me your recipe code?Hey elderzi when have my sword code all in the cs file and my sprite in my weapons folder i go ingame and it isent there to be crafted? Can you help me?
Well, I know for one that 'lavaWaders' is not a variable that is available from the Player class.Hey, can someone help me with my mod? I'm trying to add some accessories that combine other accessories, so how can I use vanilla accessory effects in a modded accessory? I unpacked the mod Miscellania by @goldenapple and it contained this in an accessory:
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.blackBelt = true;
player.dash = 1;
}
I then tried doing my accessory the same way, here's the complete item code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace MokkelMod.Items.Accessories
{
public class phoenixboots : ModItem
{
public override void SetDefaults()
{
item.name = "Phoenix Boots";
item.width = 32;
item.height = 28;
AddTooltip("Melee attacks set enemies on fire");
AddTooltip("Walk on and take no damage from lava");
item.value = Item.sellPrice(0, 5);
item.rare = 3;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.magmaStone = true;
player.lavaWaders = true;
}
public override void AddRecipes()
{
var recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.LavaWaders);
recipe.AddIngredient(ItemID.MagmaStone);
recipe.AddTile(TileID.TinkerersWorkbench);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
But when I try to build my mod, it tells me that there is no definition for "lavaWaders" and "magmaStone" and that there was no extension that contained it. If someone can help I'll be very happy.
player.waterWalk = true;
player.fireWalk = true;
player.lavaMax += 420;
Like orbit? Try positioning the npc using Sine and Cosine for x and y respectively. An example of orbiting you can use is in my tutorial in my sig, though it is for projectiles, you can edit it for npcs pretty easily since they are pretty similar to each other.Sry that i am asking this question again but how do i make an NPC that rotate around the player?
Like orbit? Try positioning the npc using Sine and Cosine for x and y respectively. An example of orbiting you can use is in my tutorial in my sig, though it is for projectiles, you can edit it for npcs pretty easily since they are pretty similar to each other.
The signature. Usually it is the stuff below comments for example I have two spoilers after each of my post that says either "tModLoader stuff" or "tAPI stuff". You want to look at my tModLoader stuff for what you are looking for.Ok thank you, oh im just wondering what is sig ?
I assume you mean with a weapon?Can someone teach me how to i add a custom buff when i on hit npc?
yes a projectileCan someone teach me how to i add a custom buff when i on hit npc?
Oww, there is a big difference thoughyes a projectile
public override void OnHitNPC(NPC target, int damage, float knockBack, bool crit)
{
npc.AddBuff(mod.BuffType("MyModBuff"), 120);
}
when i build the mod it says that the name 'npc' could not be found in the current contextyes a projectile