19 — Build Building Type...
Satisfied once the named type is the last structure type registered for the trigger's house. A structure registers its type when its owner builds it and when any house discovers it.
- Numeric ID
19- Engine ID
TEVENT_BUILD- Editor name
- Build Building Type...
- Need token
NEED_STRUCTURE- Parameters
- Building type
building-type
- Building type
- Attachment
- house
[Events]
<TriggerID>=1,19,0,<Building type>What registers a structure
Section titled “What registers a structure”A structure registers its type in its owner’s record in two cases:
- The owner places the structure after producing it.
- A house discovers the structure. The record written is always the owner’s, whichever house makes the discovery.
Discovery lets the event react to structures the house never built. In a campaign, uncovering an enemy base writes that enemy house’s record, one structure at a time, in the order the player finds them. Outside a campaign, every human player discovers each structure as soon as it is placed, so a structure placed during the game registers at once. A forced placement, described below, is the exception.
Discoveries made while the scenario loads register nothing. A structure within the player’s view when a campaign mission starts therefore does not register, while one hidden at the start registers when the player first sees it. Outside a campaign, no structure that starts on the map registers through discovery.
A structure that Create Building At… places with its force flag set follows the same rule. In a campaign, one placed within the player’s view never registers, and one placed out of view registers when the player first sees it. Outside a campaign, it never registers through discovery.
The event sees only the type registered last before its house’s list is tested. When several structures of the house register in the same frame, such as when the player uncovers part of a base at once, only one of them can satisfy the event.
To test whether the house currently owns a structure of a type, use Building exists….
Valid values
- A BuildingType. The house keeps only the last structure type registered for it, so the event compares against that one type, not against a list of everything built.
- Nothing clears the record. It changes only when another structure of the house registers a different type.
- Once satisfied, the event is [marked](/systems/trigger-springing/#remembering-a-satisfied-event) and stays satisfied, even after the record changes. A disabled trigger does not mark it, so when the trigger is enabled later, the named type must still be the last one registered.
- Any offer can satisfy this [exempt event](/systems/trigger-springing/#the-exempt-events), including the unnamed offer its house's list receives every frame.
- Use a volatile tag. Once this event is marked and the trigger's other events are satisfied, a persistent tag fires on every offer. Unless it is the first tag on the house's list, the list offers it again each time it fires. The trigger then fires without end and the game hangs, unless its actions disable or destroy the trigger.
- This event puts its tag only on the house list, which does not count toward the attachments a [semi-persistent tag](/systems/trigger-springing/#tag-lifetimes) waits on. A semi-persistent tag therefore never fires unless it also rides on an object or a cell.
- Satisfying the event also marks each temporal event written before it on the trigger's
[Events]line that can be remembered and is satisfied during the same offer, as [remembering a satisfied event](/systems/trigger-springing/#remembering-a-satisfied-event) describes.