imkSushi
Eater of Worlds
Thanks. It works. now to finish off the code.Edit: in your case, replace Player with Main.player[Main.myPlayer]
Thanks. It works. now to finish off the code.Edit: in your case, replace Player with Main.player[Main.myPlayer]
Have you installed tModLoader correctly? I've just copy+pasted that code and it worked fine. Try reinstalling tModLoader and try again.Im getting this error. Please help: Error Cs0103: The Name 'AddMapEntry' does not exist in the current context. Although Addmapentry does exist.
Here -
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ObjectData;
using Microsoft.Xna.Framework;
namespace DarkArmorReforged.Tiles
{
public class CobaltAnvil : ModTile
{
public override void SetDefaults()
{
Main.tileSolidTop[Type] = false;
Main.tileFrameImportant[Type] = true;
Main.tileNoAttach[Type] = true;
Main.tileLavaDeath[Type] = true;
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1);
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 };
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.addTile(Type);
adjTiles = new int[] { TileID.Anvils };
AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch);
AddMapEntry(new Color(255, 255, 255), "CobaltAnvil");
}
public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(i * 16, j * 16, 48, 48, mod.ItemType("CobaltAnvil"));
}
}
}
I just tried with ExampleMod and it works. Can you tell me more about what mod and npc cause the problem?when i disable a mod that has a npc in it,and go back to a world that has a modded npc in it .the world wil fail to load.
well, this mod has an npc named ed the custom weapon developer. i didnt want him in my world, so i disable the mod, and i went back to my world and it said "load backup?"I just tried with ExampleMod and it works. Can you tell me more about what mod and npc cause the problem?
Depends on what is causing the thing to happen for 10 seconds.How do I make something happen for 10 seconds?
Using npc's "npc.ai" variables helps with this, so you would probably do something like this with your NPC.How would one go about making an NPC spawn additional NPCs every few seconds, say, an NPC spawning another modded NPC every 5 seconds?
public override void AI()
{
if(npc.ai[0] == 360) //we can also do if (npc.ai[0] % 360 ==0)
{
NPC.NewNPC(//Stuff in here, too lazy to fill in);
npc.ai[0] = 0; //if we do the other way, then you wouldn't need this
}
npc.ai[0] += 1f;
}
I can confirm this. Me and my friend played this on a modded server with the tremor mod installed, and the Undead Warrior NPC disappeared upon hitting it.-Modded NPCs disappear upon being hit?
multiplayer is not working wait for the next updateI can confirm this. Me and my friend played this on a modded server with the tremor mod installed, and the Undead Warrior NPC disappeared upon hitting it.
Status: Very busy with homework
v0.7.2:
-Fix server-sync bug with OnPickup hook - Complete
Depends on what is causing the thing to happen for 10 seconds.
Using npc's "npc.ai" variables helps with this, so you would probably do something like this with your NPC.
Code:public override void AI() { if(npc.ai[0] == 360) //we can also do if (npc.ai[0] % 360 ==0) { NPC.NewNPC(//Stuff in here, too lazy to fill in); npc.ai[0] = 0; //if we do the other way, then you wouldn't need this } npc.ai[0] += 1f; }
public override void AI()
{
if(npc.ai[87] % 360 ==0)
{
NPC.NewNPC((int)npc.position.X, (int)npc.position.Y, mod.NPCType("notimportant"));
}
npc.ai[87] += 1f;
}
Try using PostAI() instead of just AI() it could work since it is called after vanilla code.Code:public override void AI() { if(npc.ai[87] % 360 ==0) { NPC.NewNPC((int)npc.position.X, (int)npc.position.Y, mod.NPCType("notimportant")); } npc.ai[87] += 1f; }
So I'm trying to get it to use the crimson mimic AI by default instead of 0, but this causes it not to spawn anymore. I probably missed something, I'm not to experienced with AI stuff.
Actually I just saw why it doesn't work, there are only, I believe, 4 places ai can store those beingTry using PostAI() instead of just AI() it could work since it is called after vanilla code.
npc.ai[0]
npc.ai[1]
npc.ai[2]
npc.ai[3]
Changing the slot worked, thanks.snip
Servers have been implemented, just there are some problems and Bluemagic is patching it up soon.Has servers been implemented?
There should be something like Terraria.bak.exe, rename that to Terraria.exe and it should work as vanilla Terraria if I recall correctly.How do I switch between Vanilla Terraria and tMod? I'm not wanting to play with the tMod all the time and I'd rather not delete, rename, move, etc, files every time I want to switch.
Well, I have a little experience with servers. I hope I could host a server for my beta testers.Servers have been implemented, just there are some problems and Bluemagic is patching it up soon.
There should be something like Terraria.bak.exe, rename that to Terraria.exe and it should work as vanilla Terraria if I recall correctly.
I remember that file from the past, but no such thing exists in my install folder of Terraria. None the less, I should figure it out eventually on how to jump back and forth without doing to much.Servers have been implemented, just there are some problems and Bluemagic is patching it up soon.
There should be something like Terraria.bak.exe, rename that to Terraria.exe and it should work as vanilla Terraria if I recall correctly.
Do you have a file called Terraria_v1.3.0.8.exe?I remember that file from the past, but no such thing exists in my install folder of Terraria. None the less, I should figure it out eventually on how to jump back and forth without doing to much.