Hands-On Usage
is_mio_assigned_to_task is commonly used to unlock Military Industrial Organization traits or determine UI availability. For example, you can use it within the available block of an MIO trait to restrict activation only when that MIO is actively assigned to a task. It can also be used in the trigger block of events or decisions to prevent players from triggering certain reward logic when the MIO is idle.
# Example: An MIO trait that can only be unlocked when the organization is assigned to a task
some_mio_trait = {
available = {
is_mio_assigned_to_task = yes
}
}
# Example: In an event trigger condition, exclude MIOs that are not assigned tasks
trigger = {
mio:my_mio = {
is_mio_assigned_to_task = yes
has_mio_size = { size > 2 }
}
}
Synergy
[has_mio_size](/wiki/trigger/has_mio_size): Frequently used alongside this trigger to ensure the MIO is not only executing a task but also meets a minimum size threshold, providing dual-gate control for trait or reward unlocks.
[is_mio_available](/wiki/trigger/is_mio_available): Using both together helps distinguish between "whether the MIO is available" and "whether the MIO has an active task," preventing logical gaps (available but unassigned is a common intermediate state).
[add_mio_task_capacity](/wiki/effect/add_mio_task_capacity): When detecting that an MIO has reached full task capacity (yes), this effect can be used to expand task slots as a reward or event consequence.
[has_mio_trait](/wiki/trigger/has_mio_trait): Often combined together to check whether an organization "possesses a certain trait and is actively executing a task" to activate higher-order conditional branches.
Common Pitfalls
- Incorrect scope placement: This trigger must be used within the
INDUSTRIAL_ORG scope. Placing it directly in a country-level trigger block will not error but will always return false—always ensure you switch to the correct scope first using mio:my_mio = { } or similar syntax.
- Treating
yes/no as a dynamic value: Some newcomers mistakenly believe they can retrieve "the number of assigned tasks" through some field, but this trigger only performs a boolean check for presence or absence. It cannot directly distinguish between 1 assigned task versus multiple tasks; you must handle this indirectly through other logic.