aerlock
Terrarian
Ok, While getting together the code and the error messages I found the "Show potential fixes" link in the error message in VS and I no longer have any errors. I was missing a using System.Collections.Generic; at the top of my code. Now I just flat out don't know how to use this function. What do I put in the EditSpawnPool function to remove any hostile creatures from the Spawn Pool?Show me your globalnpc so far.
Here's the code:
Code:
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
namespace AerlockMod.NPCs
{
public class MyGlobalNPC : GlobalNPC
{
public override void EditSpawnRate(Player player, ref int spawnRate, ref int maxSpawns)
{
spawnRate = 999999;
maxSpawns = 0;
}
public override void EditSpawnRange(Player player, ref int spawnRangeX, ref int spawnRangeY, ref int safeRangeX, ref int safeRangeY)
{
safeRangeX = 9999999;
safeRangeY = 9999999;
}
public override void EditSpawnPool(IDictionary<int, float> pool, NPCSpawnInfo spawnInfo)
{
----------> What goes here????? <----------
}
}
}
- Aerlock