Right now is attacking completely disabled. Modding is possible, but when multiple mods trying to do, it can very easy leads to conflicts.
Why I am proposing this improvement?
We have opened vehicles like bicycles, motorcycles, or even cars where are doors not attached.
So its logical that AI can hurt crew.
Please make in carsript something like this:
in CarScript: bool CanBeCrewTargettedbyAI() { return false; //or detect if all doors are present and not opened } in PlayerBase: override bool CanBeTargetedByAI(EntityAI ai) { #ifdef DIAG_DEVELOPER if (!m_CanBeTargetedDebug) { return false; } #endif return super.CanBeTargetedByAI(ai) && !IsUnconscious() && !IsInVehicle(); // modify this and instead detecting if he is crew of vehicle detect also if crew can be targetted by methid above } in ZombieBase: bool FightAttackLogic(int pCurrentCommandID, DayZInfectedInputController pInputController, float pDt) { // always update target - it can be destroyed m_ActualTarget = pInputController.GetTargetEntity(); //! do not attack players in vehicle - hotfix PlayerBase pb = PlayerBase.Cast(m_ActualTarget); if (pb && pb.GetCommand_Vehicle()) return false; //modify this and use proposed method in CarScript to detect if crew can be attacked same in chase attack logic bool ChaseAttackLogic(int pCurrentCommandID, DayZInfectedInputController pInputController, float pDt) { // always update target - it can be destroyed m_ActualTarget = pInputController.GetTargetEntity(); //! do not attack players in vehicle - hotfix PlayerBase pb = PlayerBase.Cast(m_ActualTarget); if ( pb && pb.GetCommand_Vehicle() ) { return false; } //modify this and use proposed method in CarScript to detect if crew can be attacked
As you can see, that main reason is that hotfix in ZombieBase which is not easy moddable, when you want allow be modded by multiple mods.
My proposal will solve that problem and allow us to mod AI behaviour better and without conflicting with other mods.
Please think about this improvement.