GetLevelDoors
Every door of the level, touched or not.
The keys of every door the tables export lists for the level - the ones GetDoorPosition answers for - where a mode
finds the level’s houses: a street to put someone in, a village to spread people over. Empty when the server runs without
the tables export (or with one older than the doors). GetDoors lists only the doors anyone touched.
Syntax
Section titled “Syntax”GetLevelDoors()Returns
Section titled “Returns”table - a list of door keys
Example
Section titled “Example”-- the doors within 300 m of a town's centre: its houseslocal houses = {}for _, key in ipairs(GetLevelDoors()) do local x, y = GetDoorPosition(key) if (x - townX) ^ 2 + (y - townY) ^ 2 < 300 * 300 then houses[#houses + 1] = key endendSee also
Section titled “See also”GetDoorPosition · GetNearestDoor · GetDoors · the Doors and containers group of the index
