Suggestion for Murderers/ZombiesSuggestion

Would be nice as an option that if we select zombies/murderers as the NPCs to spawn to have an option to allow instant kills
and example to add the code below and of course there would need to be a bool in the settings.

private void OnEntityTakeDamage(BaseCombatEntity baseCombatEntity, HitInfo hitInfo)
            {
                if (hitInfo != null)
                {
                    NPCPlayerApex zombieMember;

                    if (hitInfo.InitiatorPlayer != null)
                    {
                        zombieMember = hitInfo.InitiatorPlayer.GetComponent<NPCPlayerApex>();
                        if (zombieMember != null)
                        {
                            if (zombieMember.damageScale != 1f)
                                hitInfo.damageTypes.ScaleAll(zombieMember.damageScale);
                            return;
                        }
                    }

                    zombieMember = baseCombatEntity.GetComponent<NPCPlayerApex>();
                    if (zombieMember != null)
                    {
                        if (_config.NPC.HeadshotKills && hitInfo.isHeadshot)
                            hitInfo.damageTypes.ScaleAll(1000);
                    }
                }
            }​

This of course would still need some modifications

@nivex - Any chance of making the zombies compatible with ZombieHorde so they dont attack each other and Instant kills if headshots.

I suppose I could add this, it does seem a bit silly to be able to 1 shot npcs though :P

I'm not really sure how to differentiate between zombie hordes and regular scarecrows... there is no API that I'm aware of

@nivex The Zombie Horde was rewritten and technically no longer uses the scarecrows or murderers as the main component, looks like @k1lly0u is now using the ScientistNPC and altered it basically for better AI responses and methods, so when he did that change - between the 2 plugins the Zombie Hordes will now attack the Dangerous Treasures Murderers instead of co-existing. If that makes sense in a nutshell.

AS far as the option to headshot NPCs, most admins on use this method if they are using the Zombies/Murderers for their servers. Basically like any Zombie movie out there they head shot them to take them down. What is nice about k1lly0u's Zombie Horde is he allowsin the config to alter movement speeds for them and a bunch of other options.

ok will note this for later ty

this hook is never called via HumanNPC.UpdateTargets (Interface.CallHook("OnNpcTarget", this, component))

        object OnNpcTarget(global::HumanNPC player, BasePlayer target)
        {
            player.currentTarget = null;
            player.currentTargetLOS = false;
            
            return false;
        }

`private object IOnNpcTarget(HumanNPC npc, BasePlayer target)` does not seem to exist in Oxide.Rust.dll

so I'm unable to prevent human npcs from targetting my npcs. when this is fixed by Oxide then it will automatically work with the existing hook