====== Location Exits ====== aka. Warp Triggers, Entrance Triggers ===== Overview ===== When the player steps in a specific coordinate on the map, he is transported to a new map with new coordinates. ===== Offsets ===== ^ Exits (short) ^^ ^ Description ^ Value ^ | Pointers (16-bit) | $DFBB00 | | Nr of Pointers (bytes) | $0201 ($0402) | | Data Address | $DFBF02 | | Block size | $06 | ^ Exits (long) ^^ ^ Description ^ Value ^ | Pointers (16-bit) | $EDF480 | | Nr of Pointers (bytes) | $0201 ($0402) | | Data Address | $EDF882 | | Block size | $07 | The structure is a sequence of two-byte pointers. The index of the pointer is relative to the map number. The actual offset of the appointed data is the pointer value plus the pointer offset. The game system checks the actual pointer and the next pointer to determinate the amount of data to read. It can include multiple data blocks. ===== Data ===== ^ Exits (short) ^^^ ^ Offset ^ Description ^^ | $00 | X position, actual map || | $01 | Y position, actual map || | $02 | new map, low byte || | $03 | $01 | new map, high bit | | ::: | $02 | refresh parent map (from world map) | | ::: | $04 | enter on low Z-level? | | ::: | $08 | display location name | | ::: | $30 | direction facing | | ::: | $40 | ? | | ::: | $80 | ? | | $04 | X position, new map || | $05 | Y position, new map || ^ Exits (long) ^^^ ^ Offset ^ Description ^^ | $00 | X position, actual map || | $01 | Y position, actual map || | $02 | $7F | Spread Size | | ::: | $80 | Horizontal/Vertical | | $03 | new map, low byte || | $04 | $01 | new map, high bit | | ::: | $02 | refresh parent map (from world map) | | ::: | $04 | enter on low Z-level? | | ::: | $08 | display location name | | ::: | $30 | direction facing | | ::: | $40 | ? | | ::: | $80 | ? | | $05 | X position, new map || | $06 | Y position, new map || ===== Notes ===== The coordinates of the new map must be valid. Otherwise, the player can be stuck in a no-walkable tile and unable to move. Also, the warp system won't work correctly if the new coordinates bypass the new map maximum coordinates.