Creating bots in another plugin?
brantje


Hey,
Thanks for the awesome plugin.
I'm trying to have my plugin have respawnable bots spawn.
Here is some code

public class BotDataProfile {
 public bool AutoSpawn = true;
 public bool Murderer;
 public int Bots = 5;
 public int BotHealth = 150;
 public int Radius = 40;
 public List Kit = new List() {
  "raidbase"
 };
 public string BotNamePrefix = String.Empty;
 public List BotNames = new List();
 public int Bot_Accuracy = 5;
 public float Bot_Damage = 1 f;
 public bool Disable_Radio = true;
 public int Roam_Range = 20;
 public bool Peace_Keeper = false;
 public int Peace_Keeper_Cool_Down = 5;
 public int Weapon_Drop_Chance = 0;
 public bool Keep_Default_Loadout;
 public bool Wipe_Belt = true;
 public bool Wipe_Clothing = true;
 public bool Allow_Rust_Loot = true;
 public int Suicide_Timer = 300;
 public bool Chute;
 public int Respawn_Timer = 60;
 public float LocationX;
 public float LocationY;
 public float LocationZ;
 public string Parent_Monument = String.Empty;
 public int Sci_Aggro_Range = 30;
 public int Sci_DeAggro_Range = 40;
}
BotDataProfile profile = new BotDataProfile();
string jsonData = JsonConvert.SerializeObject(profile);
BotSpawn ? .Call("CreateNewProfile", "my profile", jsonData);


But the bot's don't spawn, although BotSpawn said the profile was created. (BotSpawn result: true - New Profile 39346860 was created.)


I've also tried to call botSpawnbots but also didn't work.

Any advice?

Thanks in advance!

Steenamaroo
Plugin Developer

Hi,
I'm pretty sure a plugin reload is required after CreateNewProfile although I should probably make it autospawn; That would make sense.
I'll work that in to the next update.

brantje
Original Poster
Thanks, that is very much appriciated, would be nice to have them spawn on the fly.
Edit: When you have a test version available, i'll gladly test it for you.