Skip to content

23 — Leaves map (team)...

Satisfied when a team of the named type has no members left and carries the leave-map mark.

Editor data
Numeric ID
23
Engine ID
TEVENT_LEAVES_MAP
Editor name
Leaves map (team)...
Need token
NEED_TEAM
Parameters
  1. Teamteam
Attachment
general
INI example
[Events]
<TriggerID>=1,23,1,<Team>

The mark belongs to the team, not to its members. Leaving the map lists everything that raises and lowers it. Most of those causes need nobody to leave the map:

  • Giving the team a mission target in a cell outside the playable area raises the mark as soon as the target is assigned.
  • Every frame, each infantry member that has been inside the playable area raises the mark, wherever it stands, unless it is in a tunnel or aboard a transport.

A team with such infantry keeps the mark for good. Only a new mission target inside the playable area lowers it, and the infantry raise it again in the same frame. Such a team satisfies the event when it is wiped out and then deleted, as the next section describes.

The event is offered only when a team carrying the mark is deleted for having no members left. The logic turn deletes an empty team under any of:

  • it holds the started mark, which a team gets the first time it reaches full strength or is flagged into action;
  • in a skirmish or multiplayer game, it has existed longer than DissolveUnfilledTeamDelay.

Just before that team is deleted, the event is offered to every tag on the general list, not to a tag connected with the team. Each tag then looks for an empty, marked team of the type its own event names. The team being deleted is still present and can be found.

Any other empty, marked team of the named type also satisfies the test. In a campaign, a team that never started is not deleted when it empties, so such a team satisfies the event the next time any marked team is deleted.

Valid values

  • A TeamType the scenario declares. Only a team of that exact type satisfies the event, so a team of another type leaving the map does not.
Caveats
  • A team holding infantry can satisfy the event when its last member is destroyed anywhere on the map, not only when it walks off. [What raises the leave-map mark](#what-raises-the-leave-map-mark) explains why, and [When the offer is made](#when-the-offer-is-made) gives the conditions an emptied team must meet first.
  • A team without the mark never satisfies the event, however it was emptied. A vehicle team destroyed before it is sent off the map is the usual case.
  • Once satisfied, the event stays marked as satisfied, whatever the tag's persistence. A persistent trigger holding only this event therefore fires again on every later pass over the general list, once a frame, for the rest of the scenario.
  • 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.
  • Give the trigger a volatile or a persistent tag. This event puts its tag only on the general 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.