Skip to content

Mission Flags

Til edited this page May 8, 2025 · 6 revisions

What is a mission flag?

A mission flag is a boolean variable that can have two states - set (true), and not set / clear (false).

They are identified as strings, you can imagine that every string maps to a boolean variable.

While flags can be set (or cleared) by a variety of things, their main purpose is to be used as literals (variables) in event conditions.

For example, a capture trigger might set an "obj_captured" flag, which is then used as the condition for a victory mission event.

Usage

As indicated, mission flags are represented through strings.

For example, on a capture trigger, you would have a "flag name" string parameter - capturing the trigger will then set this flag. In a mission event, you might then input the same string in a literal term, which will be true while the flag is set (so while the trigger is captured).

Note

Flag names are case sensitive. Any string is valid - except from empty strings (""), which cannot be set and are always considered false by literal terms.

More information on usage of flags within event conditions can be found on the Mission Events page.

Flag setters

The framework has several things that can set mission flags:

Name Type Description
TILW_FactionTrigger Prefab Trigger which sets a flag when (not) captured by a given faction - has several parameters like ratio threshold.
TILW_PresenceTrigger Prefab Trigger which sets a flag based on the ratio between specific local and global entities, referenced by name.
TILW_ExfilTrigger Prefab Trigger which sets a flag based on the ratio between local and global faction players.
TILW_Flag_EntityDamage Component Sets a flag based on the entities damage state (alive, damaged, dead/destroyed). Works with everything that has a destruction manager, from vehicles over single characters to destructible props. Also allows selection of specific hit zones, and setting their initial health.
TILW_ControlModeFlag Component Sets a flag based on an AI groups control mode (IDLE, FOLLOWING_WAYPOINT, AUTONOMOUS). Can e. g. be used to trigger a QRF when some previously idle AI group detects enemies and enters combat mode. More info on control modes here.
Casualty Flags FW Entity Set a flag based on the player or AI casualty ratio of a given faction.
Random Flags FW Entity Randomly set flag on mission start, can be used for mission randomization. RandomFlag is for setting a single variable, FlagSampling will randomly set a given amount of flags from a pool.
TILW_BaseInteraction Prefab Interaction which sets a flag when used by a player. Can be limited to factions.
Flag Instructions FW Entity TILW_SetFlagInstruction and TILW_ClearFlagInstruction can set/clear flags from within mission events.

Detailed explanations of individual parameters can be seen when hovering over them in the Workbench.

Clone this wiki locally