NahuelMaker
Terrarian
Somebody helps me every time I want a code for an enemy I get it wrong
can you show the code and the error? also, you should try going to the discord. people are a lot more active over there.Somebody helps me every time I want a code for an enemy I get it wrong
Somebody helps me every time I want a code for an enemy I get it wrong
the discord is in the original post. can you post the error too?c:\Users\Nassa\Documents\My Games\Terraria\ModLoader\Mod Sources\GalacticMod\NPCs\Slimi.cs(28,31) : error CS0115: 'GalacticMod.NPCs.Slimi.CanSpawn(Terraria.ModLoader.NPCSpawnInfo)': no se encontró ningún miembro adecuado que invalidar
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace GalacticMod.NPCs
{
public class Slimi : ModNPC
{
public override void SetDefaults()
{
npc.name = "Slimi";
npc.displayName = "Slimi";
npc.width = 33;
npc.height = 22;
npc.damage = 4;
npc.defense = 2;
npc.lifeMax = 30;
npc.soundHit = 1;
npc.soundKilled = 2;
npc.value = 60f;
npc.knockBackResist = 0.5f;
npc.aiStyle = 1; //see here: http://tconfig.wikia.com/wiki/List_of_NPC_AI_Styles
Main.npcFrameCount[npc.type] = Main.npcFrameCount[NPCID.Slime];
aiType = NPCID.Slime;
animationType = NPCID.Slime;
}
public override float CanSpawn(NPCSpawnInfo spawnInfo)
{
return spawnInfo.spawnTileY < Main.worldSurface && Main.dayTime ? 1.0f : 0f; //spawn at day
}
public override void NPCLoot()
{
if (Main.rand.Next(1, 50) == 1) //drop chance - This gives a 49% chance as 50-1 = 49
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.LunarBar, Main.rand.Next(5, 10)); //amount
}
}
}
}
[doublepost=1552112865,1552112739][/doublepost]
Tell me the record please
[doublepost=1552112960][/doublepost]discord Which
c:\Users\Nassa\Documents\My Games\Terraria\ModLoader\Mod Sources\GalacticMod\NPCs\Slimi.cs(28,31) : error CS0115: 'GalacticMod.NPCs.Slimi.CanSpawn(Terraria.ModLoader.NPCSpawnInfo)': no se encontró ningún miembro adecuado que invalidar
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace GalacticMod.NPCs
{
public class Slimi : ModNPC
{
public override void SetDefaults()
{
npc.name = "Slimi";
npc.displayName = "Slimi";
npc.width = 33;
npc.height = 22;
npc.damage = 4;
npc.defense = 2;
npc.lifeMax = 30;
npc.soundHit = 1;
npc.soundKilled = 2;
npc.value = 60f;
npc.knockBackResist = 0.5f;
npc.aiStyle = 1; //see here: http://tconfig.wikia.com/wiki/List_of_NPC_AI_Styles
Main.npcFrameCount[npc.type] = Main.npcFrameCount[NPCID.Slime];
aiType = NPCID.Slime;
animationType = NPCID.Slime;
}
public override float CanSpawn(NPCSpawnInfo spawnInfo)
{
return spawnInfo.spawnTileY < Main.worldSurface && Main.dayTime ? 1.0f : 0f; //spawn at day
}
public override void NPCLoot()
{
if (Main.rand.Next(1, 50) == 1) //drop chance - This gives a 49% chance as 50-1 = 49
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.LunarBar, Main.rand.Next(5, 10)); //amount
}
}
}
}
[doublepost=1552112865,1552112739][/doublepost]
Tell me the record please
[doublepost=1552112960][/doublepost]discord Which
oh sorry, didnt see it. Try switching outI passed the link
public override float CanSpawn(NPCSpawnInfo spawnInfo)
public override float SpawnChance(NPCSpawnInfo spawnInfo)
i'm not sure what the problem is but whenever i try to host and play with the tremor mod on it gets stuck on starting server, same with calamity, host and play works fine when i don't have tmod installed and i really don't know whats wrong or what to do. I played calamity like a year ago with friends and i didn't run into this problem. plz help :<
so the versions of the tremor has bugs or erores.Try to install the latest version of tmodloader to see if it works
I have offline too. And my friends ...How can I fix the mod browser? it's offline
4-5 p.m. by Moscow timeWhen did it begin offline?