public override void Update(NPC npc, ref int buffIndex)
{
//Example:
if (Main.rand.Next(2) == 0)
{
int idx= Dust.NewDust(npc.position, npc.width, npc.height, mod.DustType("MoonDust"));
Main.dust[idx].noGravity = true;
}
npc.HealEffect(-8, false);
npc.statLife -= 8;
if (npc.statLife < 0)
{
npc.statLife = 0;
}
}
Terraria>ModLoader>Players/Worlds
here you go ^-^
could you please insert that into my code? i have no idea wat to replace ._.
public override void AI() //this make that the projectile will face the corect way
{ // |
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
projectile.velocity.Y += projectile.ai[0];
if (projectile.localAI[0] == 0f)
{
Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20);
projectile.localAI[0] = 1f;
}
int num666 = 8;
Color color = new Color(36, 158, 184)
Int rand = Main.rand.Next(4);
switch (rand)
{
case 0:
color = new Color(..,..,..)
break;
case 1:
color = new Color(..,..,..)
break;
case 2:
color = new Color(..,..,..)
break;
case 3:
color = new Color(..,..,..)
break;
}
int num667 = Dust.NewDust(new Vector2(projectile.position.X + (float)num666 + 6, projectile.position.Y + (float)num666), projectile.width - num666 * 2, projectile.height - num666 * 2, 66, 0f, 0f, 0,color, 1.5f); //projectile dust color
Main.dust[num667].velocity *= 0.5f;
Main.dust[num667].velocity += projectile.velocity * 0.5f;
Main.dust[num667].noGravity = true;
Main.dust[num667].noLight = false;
Main.dust[num667].scale = 2.4f;
}
Install VisualStudio. Because, here, i can help you, but if you cannot go that alone.... hem... you know than you have already create a npc or a boss ? (I think, i have maybe forgot than no ><) PS: This is npc.lifeand also:
Code:public override void Update(NPC npc, ref int buffIndex) { //Example: if (Main.rand.Next(2) == 0) { int idx= Dust.NewDust(npc.position, npc.width, npc.height, mod.DustType("MoonDust")); Main.dust[idx].noGravity = true; } npc.HealEffect(-8, false); npc.statLife -= 8; if (npc.statLife < 0) { npc.statLife = 0; } }
i want the debuff to work on NPCs too, wat do i have to change??
ExampleMod items, search a small. With the documentation of the first page of this subject.and how do i make dust on items
http://forums.terraria.org/index.php?threads/cheat-sheet.41407/page-16#post-1004069I don't way to bother you @jopojelly or anyone else, but the code for the custom slots would be really useful for my mod.
Thanks in advance
I've looked in every menu and I have built it already, like several hundred timesYou are probably looking on the wrong menu or you haven't built it yet.
Download Examplemod then build it then try, if you cannot publish, check your version, or reinstall terraria and add Modloader.
View attachment 125975