Solo-Ion
Dungeon Spirit
There must be something wrong there somewhere. I'll have to see all of your projectile's code to really see what's happening. If someone else spots the problem before I do, feel free to jump in with a solution.ai[0]: 0 when the projectile is out and then when it reaches where the boomerang would return It goes to 1
ai[1]: goes up really fast when the projectile is out and then returns to 0 instantly and the projectile disappears
I also moved the code I put in public override void AI() to the PostAI()
Thank you. I stand corrected.The vanilla AI will always get called unless PreAI returns false; that's actually why it's necessary to set an NPC's aiStyle to -1 when you're using completely custom AI.
This may or may not be your problem, but it's probably to load a texture during gameplay. I'd suggest you load them within your main mod class. (The one that extends Mod.) define a texture inside that class like so:I found something odd. When I use this code, it sometimes causes very strange issues:
*snip*Code:public bool bodyTexMatch() { string bodyTexPath = "MyMod/Items/Armor/MyChest_Body"; string bodyFemTexPath = "MyMod/Items/Armor/MyChest_FemaleBody"; DrawData data; for(int i=0;i<Main.playerDrawData.Count;i++){ data=Main.playerDrawData[i]; Main.NewText("Texture name:"+(data.texture.Name ?? "")); if(data.texture.Equals(mod.GetTexture(bodyTexPath)) || data.texture.Equals(mod.GetTexture(bodyFemTexPath))) { return true; } } return false; }
Code:
public static Texture2D myTexture;
Code:
public override void Load()
{
if (Main.dedServ) return; //don't do the following if on a server
myTexture = GetTexture("myTexturePath");
}
I don't know if that will make any difference, but it's worth a go.