Skip to content

SetAreaTrespass

Makes an area one of the game’s trespass zones.

Inside it a player’s game shows its trespass icon and the mode hears OnPlayerTrespassChange. The levels by the game’s own names: "personal" - the blue icon (a home, a private room); "prohibited" - the red icon (a castle’s keep, a guarded camp); "semipublic" and "semipersonal" - trespass with no icon; "public" - no trespass, and the level’s own trespass there taken away (a house of the level a player owns). nil - the area says nothing and the level’s own areas decide. Where areas overlap, the highest level counts. Kept in the map with the area (the editor’s area panel sets it too).

SetAreaTrespass(name, level)
Parameter Type
name string the area
level string|nil the trespass level, or nil

boolean - true; false and the reason

CreateArea("Smithy", "box", {x1 = 820, y1 = 1610, z1 = 30, x2 = 834, y2 = 1622, z2 = 42})
SetAreaTrespass("Smithy", "personal")

SetPlayerAreaTrespass · SetPlayerTrespass · SetLevelTrespass · OnPlayerTrespassChange · the The map’s areas group of the index