SOLUTION: Separate the playing area from the "out of bounds" area with water, either by using a moat as a "wall" or converting all of the out of bounds area into water. Example:
Then enable water damage in the map's .txt file:
Code: Select all
extensions = {
'water_damage' : 100
}
CajunStyle wrote:There seems also to be an extension "boundary_damage" that lets you define a box out of which you are damaged. In map_extensions.py: line 15. I'm not sure how to define the boundary coordinates.Here's how:
Code: Select all
This means you would receive 100 damage if you walk on any of the 64 blocks from the left edge of the map, 64 blocks from the right edge of the map, 128 blocks from the top edge of the map, and 128 blocks from the bottom edge of the map. Damage occurs before the left value, after the right value, before the top value, and after the bottom value. Values are 0 to 512 left to right and top to bottom, so in this example 'right' is 512 - 64 = 448 and 'bottom' is 512 - 128 = 384.extensions = {
'boundary_damage' : {'left' : 64, 'right' : 448, 'top' : 128, 'bottom' : 384, 'damage': 100}
}
This is fine for straight boundaries. If your boundaries are curvy, use the "moat" solution.