Mounted turrets do not target most NPCSolved

probably the December updtate broke this, but I've found out turrets only target animals for the most part. BotReSpawn, Zombie Horde, even default Scientists/Scarecrows are not being targeted. Turret is in attack all mode and has only a few people authed.

 

edit: it will shoot at NumanNPC characters too. anything else is ignored

I just tested and couldn't reproduce the issue with the following prefabs.

  • player
  • scarecrow
  • scientistnpc_roam
  • scientistnpc_roamtethered

Either you have the TargetNPCs config option set to false, or another plugin is responsible.

 

the option is true. I don't know what's causing this then, thanks for testing

A quick scan of your plugins folder for keywords OnTurretTarget or CanBeTargeted will narrow down the list of possible culprits. Also, the plugin is designed to not target "non-hostile" NPCs in safe zones, in case that's a factor in your case.

I'm not a C# guy, but looking through the code, I suppose the culprit are npcs not spawned as basePlayer entities?

WL8YX7fUa39cgmg.jpg Kaizer

I'm not a C# guy, but looking through the code, I suppose the culprit are npcs not spawned as basePlayer entities?

That probability of that is basically 0. Most likely, another plugin is using the OnTurretTarget or CanBeTargeted hook to prevent targeting those NPCs under certain conditions. Performing a "Find in Files" search over a copy of the plugin directory with a text editor such as Notepad++ will narrow down which plugins use those hooks. You can then try temporarily unloading some of them (ideally on a test server that is a copy of your main server) to determine which one.

I saw that @K1lyou added this free plugin so that other plugins using npcs can continue to work. Maybe that will help. Its name is "CustomNPC 2.0.5". I would have liked to give you the direct link to the website proposing it but here, the links are prohibited to post.

Locked automatically