While AI 19 is for spears, it's hardcoded to only work for certain types. So you'll either have to copy the AI code into your own AI hook and set your aiStyle to 0, or keep the aiStyle as 19 and set the ModProjectile's aiType field to copy the exact AI of a vanilla projectile.
Sadly, no. There is a slight hint of what is happening - the loading bar for "adding recipes" goes without loading at all. I must have the smallest brain on the forums or the biggest problem
It looks like the problem is that an ArrayIndexOutOfBoundsException is causing the entire NPCLoot to end. You're setting the first index of a list with size 0. What you want to do is add the item's ID, not set an index in the list to the ID. So for example, like "NPCLoader.blockLoot.Add(ItemID.DemoniteOre);".
How do you make a boss drop more then one of an item? I know this is probably a ridiculous and easy question but I get an error whenever I try to add a ", <number>" to anywhere in there.
I copied your code in, fixed the obvious missing spaces, and added an image to my folder, then clicked build and reload, and it works for me. Doubt being on 0.4 matters. FYI, "item.useAmmo = ProjectileID.ChlorophyteBullet;" doesn't seem to work for me, you might have to do it manually in your own shoot method if you only want it to shoot cholorophyte bullets.
You'll have to change the namespace and class name if you copy my code.
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace JopojellyLearningMod.Items
{
public class ForumItem : ModItem
{
public override void SetDefaults()
{
item.name = "Zero Blaster";
item.damage = 120;
item.ranged = true;
item.width = 52;
item.height = 28;
item.toolTip = "Not for un-derts.";
item.useTime = 5;
item.useAnimation = 20;
item.useStyle = 5;
item.noMelee = true; //so the item's animation doesn't do damage
item.knockBack = 4;
item.value = 10000;
item.rare = 9;
item.useSound = 11;
item.autoReuse = true;
item.shoot = 10; //idk why but all the guns in the vanilla source have this
How do you make a boss drop more then one of an item? I know this is probably a ridiculous and easy question but I get an error whenever I try to add a ", <number>" to anywhere in there.
public static int NewItem(int X, int Y, int Width, int Height, int Type, int Stack = 1, bool noBroadcast = false, int pfix = 0, bool noGrabDelay = false, bool reverseLookup = false)
Stack is right there, I haven't done NPC drops yet though.
If you don't want them stacked, just duplicate the line.
I copied your code in, fixed the obvious missing spaces, and added an image to my folder, then clicked build and reload, and it works for me. Doubt being on 0.4 matters. FYI, "item.useAmmo = ProjectileID.ChlorophyteBullet;" doesn't seem to work for me, you might have to do it manually in your own shoot method if you only want it to shoot cholorophyte bullets.
You'll have to change the namespace and class name if you copy my code.
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace JopojellyLearningMod.Items
{
public class ForumItem : ModItem
{
public override void SetDefaults()
{
item.name = "Zero Blaster";
item.damage = 120;
item.ranged = true;
item.width = 52;
item.height = 28;
item.toolTip = "Not for un-derts.";
item.useTime = 5;
item.useAnimation = 20;
item.useStyle = 5;
item.noMelee = true; //so the item's animation doesn't do damage
item.knockBack = 4;
item.value = 10000;
item.rare = 9;
item.useSound = 11;
item.autoReuse = true;
item.shoot = 10; //idk why but all the guns in the vanilla source have this
recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock);
recipe.SetResult(ItemID.LunarCraftingStation);
recipe.AddRecipe();
recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock);
recipe.SetResult(ItemID.SoulofNight, 100);
recipe.AddRecipe();
recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock);
recipe.SetResult(ItemID.ChlorophyteBullet, 999);
recipe.AddRecipe();
}
}
}
[DOUBLEPOST=1440554854,1440554637][/DOUBLEPOST]
Are you using this method?
public static int NewItem(int X, int Y, int Width, int Height, int Type, int Stack = 1, bool noBroadcast = false, int pfix = 0, bool noGrabDelay = false, bool reverseLookup = false)
Stack is right there, I haven't done NPC drops yet though.
If you don't want them stacked, just duplicate the line.
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.