trigger · is_fighting_air_units
Definition
- Supported scope:
COMBATANT - Supported target:
none
Description
check if side is fighting air units
is_fighting_air_unitsCOMBATANTnonecheck if side is fighting air units
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
此 trigger 常用于自定义战斗事件或 on_action 脚本中,在敌方有空军参战时为己方部队触发特殊修正或决策。例如制作"防空作战"特性解锁、或在与敌机交战时提升某些指挥官的经验奖励等场景中非常实用。
# 示例:战斗事件中,若正在与空军交战则触发特定效果
on_combat_started = {
limit = {
is_defender = yes
is_fighting_air_units = yes
}
# 此处填写后续触发器或 effect 块
}
COMBATANT scope 下有效,若误写在国家 scope(如顶层 country_event 的 trigger 块)中会静默失败或报错,必须确保处于战斗相关的 on_action 或战斗事件的 combatant scope 内。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.
This trigger is commonly used in custom battle events or on_action scripts to trigger special modifiers or decisions for your forces when the enemy has air units engaged in combat. It's particularly useful in scenarios such as unlocking "anti-air operations" mechanics or granting experience bonuses to certain commanders when engaged with enemy aircraft.
# Example: In a battle event, trigger a specific effect if currently engaged with air units
on_combat_started = {
limit = {
is_defender = yes
is_fighting_air_units = yes
}
# Place subsequent triggers or effect blocks here
}
COMBATANT scope. If mistakenly placed in a country scope (such as the trigger block of a top-level country_event), it will silently fail or throw an error. You must ensure it's within a combat-related on_action or within the combatant scope of a battle event.