Project Zomboid

Project Zomboid

Party System
TACTICAL COMBAT ADDON (Need Help)
I'm trying to implement an addon, but I'm failing.

This addon would work as follows: Characters following the "leader" would have two behaviors: Alert (where they would attack any approaching threat, moving a maximum of 10 blocks away), thus mimicking the leader's weapon class: melee or ranged. They would also reload their weapon when they ran out of ammo, and if they ran out, they would automatically switch to melee.

The other behavior would be passive, simply following the leader normally, as the mod here already does.

Is there a chance this addon would actually work? Could someone with more experience help me?

*It works in the project. It consists of right-clicking on the character you're following and setting "PASSIVE" or "ALERT."

**Sorry. I used the translator because my language is Brazilian Portuguese.