trigger · has_carrier_airwings_on_mission
Definition
- Supported scope:
COMBATANT - Supported target:
none
Description
check if side has a career with air wings on a mission
has_carrier_airwings_on_missionCOMBATANTnonecheck if side has a career with air wings on a mission
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
在海战或航母相关 mod 中,可用于检测某一战斗方是否已派遣舰载机执行任务,从而触发特定的战斗事件或额外修正。例如在自定义战斗事件中,判断航母编队是否已出动舰载机,以决定是否激活某项战术加成:
# 战斗事件:检测航母舰载机是否在执行任务
combat_event = {
id = my_naval_mod.1
trigger = {
has_carrier_airwings_on_mission = yes
is_attacker = yes
}
...
}
[has_carrier_airwings_in_own_combat](/wiki/trigger/has_carrier_airwings_in_own_combat):两者常配合使用,前者检测舰载机是否在执行任务,后者检测舰载机是否已实际参与当前战斗,组合起来可精确区分"已出动"与"正在交战"两种状态。[is_attacker](/wiki/trigger/is_attacker) / [is_defender](/wiki/trigger/is_defender):用于区分战斗双方,确保只对进攻方或防守方的航母编队进行判断,避免逻辑误判。[is_fighting_air_units](/wiki/trigger/is_fighting_air_units):配合使用可进一步确认当前战斗中是否存在空中力量对抗,与舰载机任务状态共同构成完整的航母战斗判断逻辑。COMBATANT scope(即战斗参与方)下有效,新手容易误将其写在 country 或 division 等 scope 的条件块中,导致脚本报错或判断永远为假。has_carrier_airwings_on_mission 只判断舰载机是否被分配了任务,并不代表其正在当前战斗中实际发挥作用,若需判断后者应使用 has_carrier_airwings_in_own_combat,两者不可互相替代。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.
In naval or carrier-focused mods, this trigger can be used to detect whether one side of a battle has dispatched carrier-based aircraft for missions, thereby triggering specific combat events or applying additional modifiers. For example, in custom combat events, you can check whether a carrier task force has launched its aircraft to decide whether to activate certain tactical bonuses:
# Combat event: Detect whether carrier aircraft are on mission
combat_event = {
id = my_naval_mod.1
trigger = {
has_carrier_airwings_on_mission = yes
is_attacker = yes
}
...
}
[has_carrier_airwings_in_own_combat](/wiki/trigger/has_carrier_airwings_in_own_combat): Often used together with this trigger. The former checks whether carrier aircraft are on mission, while the latter checks whether they are actively participating in the current battle. Combined, they allow you to precisely distinguish between "dispatched" and "actively engaged" states.[is_attacker](/wiki/trigger/is_attacker) / [is_defender](/wiki/trigger/is_defender): Used to differentiate between the two sides of combat, ensuring that carrier task force judgments are only applied to attackers or defenders as appropriate, preventing logical errors.[is_fighting_air_units](/wiki/trigger/is_fighting_air_units): Using this in conjunction allows further confirmation that air-to-air combat exists in the current battle, forming a complete carrier combat judgment logic together with the carrier aircraft mission state.COMBATANT scope (i.e., the combatant in battle). Beginners often mistakenly place it in condition blocks of country or division and other scopes, resulting in script errors or conditions that always evaluate to false.has_carrier_airwings_on_mission only checks whether carrier aircraft have been assigned a mission, not whether they are actually contributing to the current battle. If you need to check the latter, use has_carrier_airwings_in_own_combat instead—these two triggers are not interchangeable.