Wiki

trigger · fastest_unit

Definition

  • Supported scope:COMBATANT
  • Supported target:none

Description

check if fastest unit of combatant is over this limit

Hands-On Notes

Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.

Hands-On Usage

fastest_unit is commonly used in combat-related event or decision trigger conditions, such as determining whether a unit group is equipped with high-mobility units (e.g., motorized or armored forces), thereby triggering special tactical bonuses or scenario events. When designing "Blitzkrieg" themed mods, it can be used to distinguish between conventional infantry combat and rapid breakthrough combat, granting different combat modifiers.

# Example: Trigger special tactical modifier only when the fastest unit in the combatant exceeds speed threshold
some_combat_trigger = {
    fastest_unit > 6
}

Synergy

  • [is_attacker](/wiki/trigger/is_attacker): The attacking side typically relies more on fast units to execute breakthroughs. Combined with this trigger, you can precisely filter scenarios of "armored assault by attacking forces."
  • [hardness](/wiki/trigger/hardness): Units with high hardness are usually also mechanized/armored units with faster speeds. Using both together provides a more comprehensive description of heavy fast unit combat states.
  • [has_unit_type](/wiki/trigger/has_unit_type): Used to further confirm the specific type of fast units (such as armor or motorized). Together with fastest_unit, it forms dual filtering to avoid misjudgments.
  • [phase](/wiki/trigger/phase): Different combat phases (such as breakthrough phase) combined with fast unit detection can achieve precise triggering of phase-specific tactical events.

Common Pitfalls

  1. Wrong Scope: fastest_unit is only valid under COMBATANT scope. Beginners often mistakenly use it directly under country or division scope, causing script errors or conditions that never trigger. You must ensure you are in a combat-related scope environment.
  2. Threshold Misunderstanding: This trigger compares the speed value of the fastest unit in the combatant, not average speed. Beginners sometimes mistakenly think it's the army-wide average, leading to conditions that are too lenient or too strict. It is recommended to use [average_stats](/wiki/trigger/average_stats) to distinguish between the two logics.