trigger · is_operative_captured
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
Checks whether the operative has the matching captured status
is_operative_capturedCHARACTERnoneChecks whether the operative has the matching captured status
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_operative_captured 常用于特工相关事件或决策中,判断某个特工角色当前是否处于被俘状态,从而触发营救任务、外交谈判或惩罚逻辑。例如在一个特工营救事件中,只有当该特工确实被俘时才允许玩家选择营救选项:
# 在某个事件的选项 available 块中
option = {
name = my_event.option_rescue
available = {
scope:target_operative = {
is_operative_captured = yes
}
}
# 后续 effect...
}
[free_operative](/wiki/effect/free_operative):确认特工处于被俘状态后,营救成功时调用此 effect 将其释放,两者形成"判断→处理"的完整流程。[kill_operative](/wiki/effect/kill_operative):当被俘特工有叛变风险时,可在确认被俘后选择将其处决,避免情报泄露。[operative_leader_mission](/wiki/trigger/operative_leader_mission):可与其联用,进一步区分特工是在执行何种任务时被捕,从而实现更细粒度的分支逻辑。[has_character_flag](/wiki/trigger/has_character_flag):配合角色标记使用,防止同一被俘事件反复触发,或追踪该特工是否已经历过某段剧情。CHARACTER scope 下使用,若直接写在国家 scope 的 trigger 块中而未通过 scope: 或 any_character 等方式切入角色 scope,会导致脚本报错或静默失败,新手常忘记切换 scope。is_operative_captured = no 表示特工未被俘,部分新手误以为该写法无效或与 NOT = { is_operative_captured = yes } 行为不同,实际两者等价,但在嵌套逻辑中混用容易造成条件判断方向错误。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.
is_operative_captured is commonly used in events or decisions related to operatives, to check whether a specific operative character is currently in a captured state, thereby triggering rescue missions, diplomatic negotiations, or punishment logic. For example, in an operative rescue event, the rescue option should only be available to the player when the operative is actually captured:
# In an option's available block of some event
option = {
name = my_event.option_rescue
available = {
scope:target_operative = {
is_operative_captured = yes
}
}
# Subsequent effect...
}
[free_operative](/wiki/effect/free_operative): After confirming the operative is captured, invoke this effect upon successful rescue to release them, forming a complete "check → action" workflow.[kill_operative](/wiki/effect/kill_operative): When a captured operative poses a risk of defection, you can confirm their captured status and choose to execute them to prevent intelligence leaks.[operative_leader_mission](/wiki/trigger/operative_leader_mission): Can be used in conjunction to further distinguish what type of mission the operative was executing when captured, enabling more granular branching logic.[has_character_flag](/wiki/trigger/has_character_flag): Use alongside character flags to prevent the same capture event from triggering repeatedly, or to track whether the operative has already experienced certain story branches.CHARACTER scope. If written directly in a country-level scope trigger block without switching to character scope via scope: or any_character, it will cause script errors or silent failures. Beginners often forget to switch scopes.is_operative_captured = no means the operative is not captured. Some beginners mistakenly think this syntax is invalid or behaves differently from NOT = { is_operative_captured = yes }, when in fact both are equivalent. However, mixing them in nested logic can easily cause condition evaluation errors.