Endershot355
Steampunker
Is there an onKill method so when the boss dies another one spawns?
There's the NPCLoot hook which you can use:Is there an onKill thing so when the boss dies another one spawns?
public override void NPCLoot()
{
// Spawn your other boss here using the NPC.NewNPC method.
}
public override bool CheckDead()
{
// Spawn your other boss here using the NPC.NewNPC method.
return true;
}
Ok, now how do I summon the boss without the "Boss has Awoken!" message?There's the NPCLoot hook which you can use:
Or you can use (and I'm not exactly sure when this is fired, so don't take my word on it) the CheckDead hook:Code:public override void NPCLoot() { // Spawn your other boss here using the NPC.NewNPC method. }
Code:public override bool CheckDead() { // Spawn your other boss here using the NPC.NewNPC method. return true; }
Read the README.txt, please. That would've told you to go inside the .app file and put the files in there.It isnt working for me on mac, it jsut gives me a .exe stuff
Like I said, use the NPC.NewNPC function:Ok, now how do I summon the boss without the "Boss has Awoken!" message?
NPC.NewNPC((int)npc.position.X, (int)npc.position.Y, mod.NPCType("MyNPCType"), npc.whoAmI);
If you have a target for the NPC, you can do something like the following in one of your AI methods:How to do that NPC despawn IF you die??
if(Main.player[npc.target].dead)
npc.Kill();
There was someone talking about a video tutorial a while ago (a pretty long while ago).Can someone put up a tutorial on how to make mods on YouTube? I really want to start modding but I can't find any tutorials. Also, what programming language is this?
Definitely helps. I'll start learning C# then. To be honest never heard of C#.If you have a target for the NPC, you can do something like the following in one of your AI methods:
Code:if(Main.player[npc.target].dead) npc.Kill();
There was someone talking about a video tutorial a while ago (a pretty long while ago).
Right now there's not really a video tutorial. There are, however, threads and info that should get you started (the links for those are in the OP).
Other than that: tModLoader programming is done in C#. Hope this helps
Haha, glad to be of service!Definitely helps. I'll start learning C# then. To be honest never heard of C#.
Alright then. Sounds good. Don't know what I'm gonna add though. Hmmm. ADD ALL THE THINGS!!!!Haha, glad to be of service!
If you google something like 'C# tutorial', it'll yield a lot of results. Some in the form of plain theory and some in the form of making a small application/game. You'll have to see what works for you
Also, I'd suggest downloading 'Microsoft Visual Studio 2015 Community Edition' (if you're running Windows, that is). It'll make your life a lot easier in the (near) future.
Can't you just Main.projectile[index].scale = ??How do I increase the scale of a projectile using the shoot function?
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace Enderuim.Projectiles
{
public class CodexVolt : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Codex Voltra";
projectile.damage = 30;
projectile.width = 32;
projectile.height = 32;
projectile.hostile = true;
projectile.melee = true;
projectile.penetrate = 0;
projectile.tileCollide = true;
projectile.alpha = 100;
projectile.aiStyle = 1;
projectile.knockBack = 0;
projectile.light = 0.5f;
aiType = 1;
}
}
}
How do I make a vanilla NPC drop a mod item?Can't you just Main.projectile[index].scale = ??
How do I make a vanilla NPC drop a mod item?
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Enderuim
{
public class MyGlobalNPC21 : GlobalNPC
{
public override void NPCLoot(NPC npc)
{
if (npc.type == 266 && Main.rand.Next(20) == 0) //266 is the NpcID, and the number next to main..rand.next is the rarity. this is currently 5% chance
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("BloodTome"), 1); //Item spawn
}
}
}
}
Thanks.Code:using System; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace Enderuim { public class MyGlobalNPC21 : GlobalNPC { public override void NPCLoot(NPC npc) { if (npc.type == 266 && Main.rand.Next(20) == 0) //266 is the NpcID, and the number next to main..rand.next is the rarity. this is currently 5% chance { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("BloodTome"), 1); //Item spawn } } } }
Can I put this in the shoot function? Or not? If I can what do I use to identify the one shot?Can't you just Main.projectile[index].scale = ??
I have been asking this question for weeks: How does one make a laser (heat ray) prejectile????
public override void AI()
{
projectile.localAI[0] += 1f; //Increase counter by 1
if (projectile.localAI[0] > 3f) //by 3rd count, activate beam
{
for (int num562 = 0; num562 < 3; num562++)
{
projectile.alpha = 255; //makes projectile invisible
int num563 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y - projectile.height/4), projectile.width + 4, projectile.height + 4, 15, 0f, 0f, 0, default(Color), 0.75f); //Dust for laser beam
Main.dust[num563].scale = (float)Main.rand.Next(70, 110) * 0.013f; //Randomizes scale of the dust
Main.dust[num563].velocity *= 0.2f; //how fast dust goes
Main.dust[num563].noGravity = true; //makes dust float
}
}
}