Afer the player and NPC/s are created, for them to interact with
each other, guard zone and nav mesh need to be created.
Guard zone is simple collider ( usually box collider ) with
'NPCGuardZone' component.
It is the NPCs area of operatons.
Multple guard zones can be placed on the scene.
How combat calcualtions ( choosing targets ) will be done is set in ‘NPCManager’ component on scenecontroller object ‘Update Zone Freq’ field.
Calculation options are:
- OnPlayerInside ( combat calcualtions are done only if player inside zone )
- On Visible ( combat calcualtions are done only if visible )
- Always ( combat calcualtions are always calculated )
- Start On Player Inside Otherwise Always ( combat calcualtions are done always after players first steps into the zone )
You can drag already created guard zone from 'Prefabs' folder.
NPCs are using nav mesh to navigate through a scene so don't
forget to bake it.
You can tweak NPC stats in stats and NPC scripts.