trigger · fastest_unit
Definition
- Supported scope:
COMBATANT - Supported target:
none
Description
check if fastest unit of combatant is over this limit
fastest_unitCOMBATANTnonecheck if fastest unit of combatant is over this limit
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
fastest_unit 常用于战斗相关事件或决策的触发条件,例如判断某支部队是否装备了高机动性单位(如摩托化、装甲部队),从而触发特殊战术奖励或情景事件。在设计"闪电战"主题 mod 时,可以用它来区分传统步兵战斗与快速突破战斗,给予不同的战斗修正。
# 示例:仅当战斗方最快单位速度超过阈值时,触发特殊战术修正
some_combat_trigger = {
fastest_unit > 6
}
[is_attacker](/wiki/trigger/is_attacker):进攻方往往更依赖快速单位实施突破,结合该 trigger 可精确筛选"发动装甲突击的进攻方"场景。[hardness](/wiki/trigger/hardness):硬度高的部队通常也是速度较快的机械化/装甲单位,两者配合可更全面地描述重型快速部队的战斗状态。[has_unit_type](/wiki/trigger/has_unit_type):用于进一步确认快速单位的具体类型(如装甲或摩托化),与 fastest_unit 形成双重筛选,避免误判。[phase](/wiki/trigger/phase):不同战斗阶段(如突破阶段)配合快速单位检测,可实现阶段性战术事件的精准触发。fastest_unit 仅在 COMBATANT scope 下有效,新手容易在 country 或 division scope 下直接使用,导致脚本报错或条件永远不触发,必须确保处于战斗相关的 scope 环境中。[average_stats](/wiki/trigger/average_stats) 来区分两种逻辑。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.
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
}
[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.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.[average_stats](/wiki/trigger/average_stats) to distinguish between the two logics.