-
Notifications
You must be signed in to change notification settings - Fork 8
Mission Flags
A mission flag is a boolean variable that can have two states - set (true), and not set / clear (false).
They are identified as strings, with every string mapping 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.
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).
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.
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 number of present valid prefabs - has multiple filter options. |
| 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. |
| FactionPlayersKilledFlag | FW Entity | Sets a flag based on the player casualty ratio of a given faction, excluding AI. |
| 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.