info_endgate

mapindex

info_endgate is an entity which works with Quoth’s Mapindex system.

Session Mapindex
The Session Mapindex is a number which is preserved over map changes and updated by trigger_changelevel entities. The simplest use of the Session Mapindex is to have a hub level which changes according to the other levels which have been visited (like the quake start map after you complete an episode), but the system is flexible enough to allow other uses as well.

info_endgate acts like a trigger_relay which fires at the start of the level, conditionally on the value of the session mapindex. Set the mapindex key to n between 1 and 10, and the info_mapgate will calculate the sum of the first n bit-flags (1,2,4,8…). The info_endgate will trigger if the Session Mapindex is exactly equal to that sum. If you give one of those bit-flags to each of a set of maps (using the trigger_changelevel mapindex), the info_mapgate works as a counter which fires once all n maps have been visited.

If you apply spawnflag 1 to an info_endgate the trigger condition is inverted, so it will fire unless the mapindex condition is met.

For detection of individual bit-flags, use an info_mapgate.

<-Back to the tutorial

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.