Skip to content

32 — Building exists...

Satisfied while the house that owns the trigger has at least one structure of the named type.

Editor data
Numeric ID
32
Engine ID
TEVENT_BUILDING_EXISTS
Editor name
Building exists...
Need token
NEED_STRUCTURE
Parameters
  1. Building typebuilding-type
Attachment
house
INI example
[Events]
<TriggerID>=1,32,0,<Building type>

Valid values

  • A BuildingType. Only structures of exactly that type count.
Caveats
  • A structure counts from the moment it is created until it is removed from the game, whether or not it is on the map.
  • A structure in production counts from the moment its production starts, because the factory creates it then and holds it until it is placed. The event is therefore satisfied for the whole build. Canceling the production removes the structure, and it stops counting.
  • An [Insignificant=yes](/keys/insignificant/) structure never counts.
  • Ownership decides the count, not who built the structure. A captured structure counts for its new owner and stops counting for the old one.
  • The event puts its tag on the list of the house that owns the trigger. That list is offered every frame, so the event is satisfied from the first frame the house has such a structure.
  • Avoid a persistent tag. Unless it is the first tag on that house's list, the list offers a persistent tag again each time it fires. While the house keeps such a structure, the trigger fires without end and the game hangs.
  • A semi-persistent tag fires only while exactly one object or map cell holds it, and this event attaches the tag to neither. Use a volatile tag.
  • Satisfying the event also marks each temporal event written before it on the trigger's [Events] line that is satisfied during the same offer, as [remembering a satisfied event](/systems/trigger-springing/#remembering-a-satisfied-event) describes.