Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. NPC Factions
  4. NPC Attack Manager

NPC Attack Manager

The NPC Attack Manager¬†is responsible for the NPC faction’s offensive behavior.

When creating a new NPC Manager object using the RTS Engine menu. The NPC Attack Manager is a component of the new NPC Manager’s “NPCArmyManagers” child object.


Picking aTarget Faction:

  1. Can Attack: Enable to allow the NPC faction to attack other factions.
  2. Attack Resources: A list that defines the resource types that the NPC faction will base its decision upon when picking one to attack.
  3. Target Faction Type: Pick how the NPC faction chooses a target faction to attack:
    1. Random: The NPC faction will randomly pick another faction to attack.
    2. Most Attack Resources: The NPC faction will pick the faction with the most total amount of the resource types specified in the Attack Resources field.
    3. Least Attack Resources: The NPC faction will pick the faction with the least total amount of the resource types specified in the Attack Resources field.
  4. Set Target Faction Delay (in seconds): Delay time before the faction picks a target faction to attack.

Launching an Attack:

  1. Launch Attack Reload Range (in seconds): When the NPC faction has target, this field defines how often this component checks whether it can launch an attack or not.
  2. Launch Attack Resources: Specify the resource types and the minimum amount required of these resources that the NPC faction must have before launching an attack towards its target faction.

Attacking:

  1. Attack Order Reload Range (in seconds): When the NPC faction is carrying an attack, this field defines how often will this component give orders (on which buildings and units in the target faction’s territory to attack) to the units doing the attack.
  2. Target Picker: Allows to specify unit/building codes and categories that the NPC faction will engage to while attacking its target faction.
  3. Cancel Attack Resources: When the NPC faction is engaging in an attack and one of the resource types defined in this field have an amount below the value specified in this field, the NPC faction will cancel its attack.

How can we help?