Wiki

trigger · is_scientist_injured

Definition

  • Supported scope:CHARACTER
  • Supported target:any

Description

Checks if the scientist of the character in scope is injured
is_scientist_injured = <bool>
ex: my_character = {
        is_scientist_active = yes
	}

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

在需要对受伤科学家进行特殊处理的 mod 场景中(如暂停研究项目、触发剧情事件或限制科学家行动),可用此 trigger 检测科学家当前是否处于受伤状态。例如,在事件选项中仅当科学家未受伤时才允许指派其执行任务:

available = {
    is_scientist_injured = no
}

配合关系

  • [is_active_scientist](/wiki/trigger/is_active_scientist) — 通常先确认角色是否是活跃科学家,再检查其是否受伤,避免对非科学家角色进行无效判断。
  • [injure_scientist_for_days](/wiki/effect/injure_scientist_for_days) — 常用于触发受伤效果后,再以 is_scientist_injured 反向检验受伤状态是否已生效,用于调试或后续条件分支。
  • [has_scientist_level](/wiki/trigger/has_scientist_level) — 高等级科学家受伤时往往需要额外的剧情处理,两者组合可针对特定级别的受伤科学家触发不同逻辑。
  • [add_scientist_xp](/wiki/effect/add_scientist_xp) — 在恢复阶段给予科学家经验奖励时,需确保受伤状态已结束,常与此 trigger 的否定形式配合使用。

常见坑

  1. 忘记确认 scope 是否为科学家角色:直接在国家或省份 scope 下使用此 trigger 会导致脚本报错或永久返回假,务必确保当前 scope 指向一个具有科学家身份的 CHARACTER。
  2. 将受伤状态与非活跃状态混淆:科学家未受伤并不代表其处于活跃状态,is_scientist_injured = no 并不等同于 is_active_scientist = yes,两个条件需分开判断,不可相互替代。

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

In mod scenarios requiring special handling of injured scientists (such as pausing research projects, triggering scripted events, or restricting scientist actions), you can use this trigger to detect whether a scientist is currently in an injured state. For example, in event options, only allow a scientist to be assigned tasks if they are not injured:

available = {
    is_scientist_injured = no
}

Synergy

  • [is_active_scientist](/wiki/trigger/is_active_scientist) — Typically confirm first whether the character is an active scientist before checking if they are injured, to avoid making invalid checks on non-scientist characters.
  • [injure_scientist_for_days](/wiki/effect/injure_scientist_for_days) — Commonly used to trigger the injury effect, then reverse-verify the injured state with is_scientist_injured to confirm the effect has taken hold, useful for debugging or subsequent conditional branches.
  • [has_scientist_level](/wiki/trigger/has_scientist_level) — High-level scientists often require additional scripted handling when injured; combining these two allows you to trigger different logic for injured scientists of specific levels.
  • [add_scientist_xp](/wiki/effect/add_scientist_xp) — When granting experience rewards to scientists during recovery phases, ensure the injured state has ended; commonly used in conjunction with the negated form of this trigger.

Common Pitfalls

  1. Forgetting to confirm the scope is a scientist character: Using this trigger directly under a country or province scope will cause script errors or permanently return false. Always ensure the current scope points to a CHARACTER with scientist status.
  2. Confusing injured state with inactive state: A scientist not being injured does not mean they are in an active state. is_scientist_injured = no is not equivalent to is_active_scientist = yes; these two conditions must be evaluated separately and cannot be used interchangeably.