Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. Attack Behavior
  4. Attack Component – Damage

Attack Component – Damage

Damage Settings of the attack component.


  1. Can Deal Damage: Enable this option in so that the attacker can deal damage to its target. If this is disabled, then the attacker can still pick a target and launch an attack but no damage will be dealt to the target.
  2. Unit Damage: Default damage to apply to units per attack.
  3. Building Damage: Default damage to apply to buildings per attack.
  4. Custom Damages: The attacker can also apply different damage points depending on the type of its target. For each custom damage, add an element to this array and input the faction entity’s Code and the Damage value that will be dealt in case the faction entity with that code is engaged by this attacker.
  5. Area Attack Enabled: Enable this field in order to allow the attacker to apply an area of effect attack. When enabled, the following fields should be visible.Each element of the Attack Ranges defines a certain range where units and buildings would receive certain damage points. For each element:
    1. Range: Size of the range where units and building will be dealt damage. Make sure that each element has a smaller range than the range values defined for all elements that come after it.
    2. Unit Damage: Damage that will be dealt to units inside the defined range.
    3. Building Damage: Damage that will be dealt to buildings inside the defined range.
  6. DoT (Damage over Time) Enabled: Enable this field if the attacker can execute damage over time for its target. When enabled the following fields should appear:
    1. Infinite: When enabled, then the DoT will be applied to the target until it is destroyed or the DoT effect is stopped using an external component.
    2. Duration: In the case where the DoT is not infinite, this presents the time, during which damage will be applied to the target.
    3. Cycle Duration: Each cycle, the defined damage will be applied to the target.
  7. Effect: An Effect Object that spawns on the target’s position whenever an attack is applied.
  8. Effect Life Time: The life time (in seconds) of the above effect object, during which the effect will be visible on the target.

How can we help?