Which RandomSpawns?
Is it on Oxide? (I know of a premium one, but I am unsure if I’m able to post the name of the site haha)
BotSpawn
Moved
Total Downloads: 11,762 - First Release: Jul 31, 2017 - Last Update: Jul 27, 2018
- 5/5, 81 likes
-
-
-
-
-
@Steenamaroo No one seems to be talking about this but Facepunch released a server update dealing with the ai yesterday morning. After installing it the ai that normally are fine and do what there supposed to now won't engage unless right under there nose, literally.
-
@Steenamaroo
I've managed to fix the conflict between my plugin and yours.
I couldn't change the part of my code where it was conflicting from, as it was a needed portion.
Code:object OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info) { NPCPlayerApex Scientist = null; if (entity is NPCPlayerApex) { Scientist = entity as NPCPlayerApex; if (!TempRecord.NPCPlayers.Contains(Scientist)) return null; if (info.Initiator is BasePlayer) { var damagedbot = entity as NPCPlayer; var canNetwork = Vanish?.Call("IsInvisible", info.Initiator); //bots wont retaliate to vanished players if ((canNetwork is bool)) if ((bool)canNetwork) { info.Initiator = null; } if (configData.Options.Peace_Keeper) //prevent melee farming with peacekeeper on { var heldMelee = info.Weapon as BaseMelee; var heldTorchWeapon = info.Weapon as TorchWeapon; if (heldMelee != null || heldTorchWeapon != null) info.damageTypes.ScaleAll(0); } var bData = Scientist.GetComponent<botData>(); float multiplier = 100f / bData.health; info.damageTypes.ScaleAll(multiplier); } } if (info?.Initiator is NPCPlayer && entity is BasePlayer) //add in bot accuracy { var attacker = info.Initiator as NPCPlayerApex; if (TempRecord.NPCPlayers.Contains(attacker)) { var bData = attacker.GetComponent<botData>(); System.Random rnd = new System.Random(); int rand = rnd.Next(1, 10); if (bData.accuracy < rand) //scale bot attack damage { return null; //<-- Here } else { info.damageTypes.ScaleAll(bData.damage); return null; } } } return null; }
Doesn't solve it the way it was intended to solve the problem. Working towards another solution.Last edited by a moderator: Feb 24, 2018 -
I've changed Activate to true, renamed the spawn, and changed keep default loadout to true, all done on the .json file in the config portion of oxide. Restarted the server and still no bots. Any suggestions on what to try next?
Attached Files:
-
-
If I return null for all conditions then the code does nothing.
Returning true there is part of the accuracy code, making the bot 'miss'.
What is return HitInfo doing in your plug?
[DOUBLEPOST=1519502181][/DOUBLEPOST] -
[DOUBLEPOST=1519503583][/DOUBLEPOST] -
To where? For use elsewhere in the plugin?
Edit: Sending PM. -
how can I give the bots more ammo
-
They have infinite ammo by default.
If you want to give them ammo as loot, put some in the main container of their kit. -
-
-
I cant seem to load the plugin, it was working but now it wont load
-
@Steenamaroo Quick update on previous post, Seems after downloading the ai update it auto changed ai_dormant to true. Once I changed it to false again they were what I remember.
-
Good! Thanks for that mate.
-
Hey, is it okay if you tell me how to get zombies AND scientists to spawn? because I would like players to see random events as in fighting at radtowns! Thanks if you reply.
-
They wont fight each other but, to have both at the same location, just create two profiles in the same place and have one set to murderer=true and the other murderer=false.
[DOUBLEPOST=1519597944][/DOUBLEPOST]